Questions tagged [xpath]
The primary purpose of XPath is to address parts of an XML document. It also provides basic facilities for manipulation of strings, numbers and booleans. XPath uses a compact, non-XML syntax. XPath operates on the abstract, logical structure of an XML document, rather than its surface syntax.
xpath
39,494
questions
1
vote
1
answer
32
views
XPath expression for finding subsequent elements that have the same tag name
Here is a sample XML:
<Body>
<Subsection lims:inforce-start-date="2018-12-15" lims:fid="170842" lims:id="170842">
<MarginalNote lims:inforce-start-date=&...
-1
votes
1
answer
156
views
How to locate an element by Xpath/CSS selectors using Playwright
How to locate an element by Xpath/CSS selectors using Playwright TS/JS?
There are many locators in Playwright (in comparison to Selenium)
such as getByRole and getByText.
Is there any locator like ...
0
votes
0
answers
146
views
Result throw Namespace prefix 'ext' is not defined
I tried to add XmlDsigXPathTransform to reference but the code signedXml.ComputeSignature() throws an error
Namespace prefix 'ext' is not defined
This is the code:
//Generate the xmlDoc
AXG_Invoice....
1
vote
1
answer
107
views
How to troubleshoot XPath not finding elements on a web page?
I am using a Bash script to search a web page with a specific XPath expression:
# Define variables for the URL and browser
sGDomain="idealista"
sGCitta="fucecchio-firenze"
sGTypo=&...
0
votes
1
answer
57
views
How to generate a JSON string with XPath 3.1
I have some text in a node, for example:
<xml><Hello world "&" foo bar></xml>
I would like to process string(/xml) and JSON-escape it so that the result ...
0
votes
1
answer
47
views
How to differentiate between Map, Array, String, etc... in XPath 3.1?
Is there a function that can test (or return) the type of .? For example:
( root(), (), "a", 1, map{}, array{} ) ! unknown:type-of(.)
node
sequence
string
number
map
array
0
votes
1
answer
42
views
replace strings in arbitrarily nested maps/arrays with XQuery/XPath 3.1
I have a map parsed from a JSON file, for example:
let $template := map{
"name" : "{{name}}",
"aggregateRating": map{
"ratingValue": "{{...
0
votes
1
answer
48
views
I have created a script to check a checkbox. After clicking on the checkbox, a new tab opens, but the checkbox remains unchecked
I want to automate the signup process but I'm unable to check the box using Playwright. Each time I click on the checkbox, I am redirected to a new link. In the DOM, when the checkbox is checked, the ...
1
vote
1
answer
36
views
XPath exclude child similar elements
How can I select all elements by attribute name but exclude child elements that are identical using XPath?
HTML
<div c-store="test">
<div c-text>Product Name</div>
...
0
votes
1
answer
42
views
Is it safe to define a variable and use it in an other `:=` before the `return`?
I remember reading somewhere that XPath could potentially process the components of an expression in //; so my question is: Can I define a variable and use it in an other variable definition of the ...
0
votes
0
answers
68
views
How to Dynamically Populate Schema in WordPress Using XPath Variables?
I have Schema for post type "company" in my WordPress project, but I also have XPath variables but I don't know what to do with them. Can anyone who maybe have worked in XPath help me ...
0
votes
0
answers
41
views
How to split a (sysrepo, netconf) xpath into a json object
I am working with NETCONF and Sysrepo. When a change is made in the sysrepo managed configuration, it gives a call back so that the corresponding change can be effected in the underlying hardware. The ...
0
votes
1
answer
101
views
Netopeer2-cli subscribe notifications to get changed values along with xpath
I'm using netopeer2 library and running netopeer2-cli and netopeer2-server on separate machines.
I'm subscribing to the config change notifications from netopeer2-cli using subscribe rpc.
The ...
0
votes
2
answers
86
views
The directly pasted XPATH of a link into selenium is leading to another link
I am automating the login and profile completion of a Linkden profile. I have been able to get to the home page and past the login page. I am trying to go to the profile page by simulating the click ...
0
votes
0
answers
37
views
How to use variable in XPath in XAML?
When using XPath bindings in XAML, how can I use a variable in the path?
If I have
<TextBox Name="MyInput" />
<TextBox Name="Result" Text="{Binding XPath=//Item[@...