704 questions
1
vote
0
answers
33
views
Set operation gives an error with Oxygen but not in XMLSpy - what am I missing here?
This works in XMLSPy but not in oXygen 21 with Saxon 12.5:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/...
2
votes
4
answers
105
views
How can I determine if a sequence is an ordered subsequence of another sequence in XPATH 2.0?
In XPath 2.0, how can I determine if a sequence is a contiguous subsequence of another sequence?
For example ('1','2') is a contiguous subsequence of ('a','b','1','2','3','4')
Here, I am not ...
2
votes
1
answer
37
views
Is XPath 2.0 backwards compatible? If not, where can I find a list of breaking changes?
I am working on an application that extensively uses XPath expressions. The current XPath processor only supports XPath 1.0 syntax. I want to upgrade the application to support XPath 2.0 syntax. Is ...
0
votes
2
answers
62
views
How to extract p tag out of ul tag in xslt
I am trying to transform multiple p tags. If tag has @style then it should be list item otherwise it should just be p tag itself.
This is my input:
<blockquote>
<p style="margin-left: ...
0
votes
2
answers
73
views
XSLT 2.0 for-each-group
I'm trying to understand how works grouping in xslt 2.0. My case: I need to group several documents with identical nodes value.
Xml example:
<items>
<item>
<!-- can be multiple --&...
0
votes
0
answers
42
views
unable to apply an xpath expression to a map object using jaxen
Hi I am having an xpath expression "infoList//groupId" which i am trying to apply on a java bean object using jaxen api . however it is returning empty results.
The following is my class
...
1
vote
1
answer
84
views
Why does fn:encode-for-uri('§') result in %C2%A7 rather than just %A7?
In Oxygen XML Editor 27.0, using the "XPath/XQuery Builder" (which, as far as I know, makes use of Saxon as XPath/XQuery processor), when I execute the XPath 2.0 query encode-for-uri('§'), I ...
0
votes
1
answer
99
views
Find Version of XPath in Simple XML for PHP
I am working in PHP and using SimpleXML and XPath.
Is there a way to find which version of XPath is included with SimpleXML/PHP?
Also, is the version of XPath used with SimpleXML the "full ...
2
votes
1
answer
44
views
Extract the xpath following child node with condition
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
>
>
> <a:Passengers>
> <a:Passenger>
> <a:PaxID>...
0
votes
0
answers
162
views
How to find xpath to be used for panos arbritary code execution?
I used burpsuite to retrieve the requests by intercepting it but I do not see xpath instead, i see xpathid.
I am not sure if the xpath is /system-general/login-banner, since it gave an error message:
...
2
votes
1
answer
54
views
Escaping regex in XPath using SaxonJ HE
I am trying to make the below negative lookahead work in a matches() argument, of a XPath expression, using SaxonJ HE 12 (java):
//test[matches(me, '(?!0115)[0-9]{4}')]
I know I need to escape some ...
0
votes
1
answer
35
views
Trying to pull back the expected value between two conditions
XML:
Below is the sample XML trying below 2 ways but doesn't return any value. Am I doing Something wrong on Template match or condition
<root>
<Pol>
<InsOrPrincipal>
...
0
votes
1
answer
50
views
How do I select element with condition from other node
Suppose I have an HTML
<product-card>
<card>
<row-layout>
<div>
<div>
<span>Product AAA</span>
</div>
</...
0
votes
1
answer
68
views
I want to only extract the content of li without the contents of span in Python Selenium WebDriver
So here is the sample html doc:
<div id="div1">
<ul class="lists">
<li class="listItem1"> List content
<span class="...
3
votes
6
answers
179
views
selecting preceding cousins (including siblings)
I often have the problem of wanting to select the previous 'cousin' to a node.
For example:
<root>
<level1>
<level2 id="1"/>
<level2 id="2&...
0
votes
2
answers
305
views
need XPath 2.0 c++ for minGW
I am looking for a library for XPath 2.0 c++ minGW.
libXML2 only supports 1.1. Saxon doesn't run under minGW.
2
votes
1
answer
213
views
How do I get the line numbers of a saxonc XPath match?
I'm building a report that will show the line numbers of XML elements that match a set of XPaths. I need to support XPath 2.0. Sending the XML to a separate web based processor written in Java or C# ...
0
votes
1
answer
224
views
get year, week number, week day number from format-date, BUT my weeks start on Saturday
This is a general sort of ISO issue, and I know it's potentially nightmarish. Xpath usefully has a function
format-date
which has mind boggling parameters that I'll work out from
https://www.w3.org/...
0
votes
0
answers
52
views
XPath parser continously looping to find Xpath function library in a given custom xpath expression
I am trying to load a custom library of XPath functions in my project using a custom build jar.
However when the function is called to load the XPath functions i get redirected to XPathParser.java ...
0
votes
1
answer
50
views
XSLT: Pull value from cross-reference
I'm trying to pull values from an aff element that matches a cross-reference id, but not sure what XPath to get specific matched value.
XML:
<article>
<contrib-group>
<contrib ...
0
votes
0
answers
57
views
Is it possible to copy an attribute from one XML document to another XML using XSLT/Xpath 2.0
Trying to copy an attribute from XML 1 to another XML 2 using xslt/xpath. 1-1 combination works but I am having 1 to many combinations between X and Y elements and I keep getting below error.
...
0
votes
1
answer
69
views
XPath find element if children element contains text
Say I have the following elements
<div class="someDiv">
<p class="someP">1</p>
<span class="someP">2</span>
<h1 class="...
-1
votes
1
answer
65
views
Xpath inside xpath
I am trying to create an xpath for the below scenario, could you please help ?
How can i find out the value of C whose @parent is /A/B/@id, that is PQR, C may not be the immediate next node . I want ...
0
votes
2
answers
66
views
Using XPath to select a descendant node that doesn't have a specified intermediate node
Using XPath 2.0 (ideally) or 3.0 (an option), I'd like to select a node C that is a descendant of A as long as the path from A to C does not contain any B nodes.
<Root>
<Other>
<A&...
0
votes
3
answers
101
views
How to get a node with Xpath which has only digits in the text attribute?
I have this kind of DOM:
<a>abc</a>
<a>def</a>
<a>13456</a>
<a>gh564</a>
I want to get the element which contains only digits.
I could do it by ...
0
votes
1
answer
73
views
xsl how do I apply a XML document as a variable to a template
I have this basic template which sorts & removes certain nodes from my XML document. It works as expected in a stand alone XSLT when passing the XML file as an input parameter of a Saxon command.
&...
0
votes
1
answer
28
views
How to locate the element which has same class name and text as shown below
I need to click on the element which is there in the list but I am unable to click on the element I am using (//[@class="pb-dropdown__contents pb-dropdown__contents--no-margin pb-...
2
votes
2
answers
57
views
Xpath Is there a less verbose way to filter with multiple 'contain' conditions?
and (contains(BusinessType,'Restaurant') or contains(BusinessType,'Pub') or contains(BusinessType,'Takeaway') <snip...>)
The above works as expected returning cases containing the specified ...
1
vote
3
answers
81
views
how to implement when in xpath where i want to validate a parent node is same as present in condition?
"name" : "a",
"type": "container",
"kids": [{
"name": "a1",
"type": "container"...
0
votes
1
answer
33
views
How to shorten xpath for multilingual support having same attribute with multiple values but using contains function?
Earlier my xpath for a certain image element was written with text containing English words.
Now, with vernacular support it has lengthened.
Seeking help to shorten it.
XPath with English support:
//...
0
votes
0
answers
126
views
How to get the URL via ImportXML of the first ten Google Search results?
I am trying to get 10 links via a google sheet from page 1 of the Google Search Results (not including any links to advertised links):
I am using the following formula, but It's ERROR
=IMPORTXML("...
0
votes
1
answer
17
views
Fetching an Xml Listobject depending on the value in one of its keys
I am currently going through an xml data,
<datas>
<data>
<key1>ABC</key1>
<key2>def</key2>
</data>
<data>
<key1&...
0
votes
2
answers
48
views
XPath get element value from XML
I have below XML
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap....
0
votes
1
answer
244
views
Extracting a list of list with xpath
I would like to use an xpath to get a list of list (or sequence of sequence) that groups extracted xml tags by parent element in order.
Here are my attempts so far using a minimal example..
import ...
0
votes
1
answer
428
views
Unable to Find the Xpath for Google Home Page textarea or Input
Unable to find the XPath for google home page - Search box.
Open the Chrome Browser
Inspect the default Google Search box on chrome browser
Reference Image
Refer the image, we have to write the ...
1
vote
1
answer
54
views
Need XPath to extract and rearrange data
I am trying to extract the data from xml document but I am failing to do it correctly.
Below is the sample xml data from which I need specific string details .
XML file
<BESAPI xmlns:xsi="http:...
1
vote
2
answers
100
views
Resolving pointer schemas in TEI
Text Encoding Initiative reccomends using various pointer schemes. Are there already any XSLT (<= 2.0) implementations which can deal with resolving them? For instance, resolving of @corresp="#...
0
votes
1
answer
505
views
Compact way to insert two newlines together in XPath
In XPath I want to insert some newlines when using concat(…) and/or string-join(…). From Line breaks (\n) via concat() in XPath? I learned I can insert a newline using codepoints-to-string(10). For ...
0
votes
0
answers
46
views
Can't click on element in selenium for login
I am trying to click on this element in selenium for login but it wont work for me. Here is the html code for it.
This is my code for it
driver.FindElement(By.XPath("//div[@id='otherTile']")...
1
vote
3
answers
83
views
I am trying out XSLT 2.0 but I can't figure out an XPath related problem using following-sibling
This code below works but I want it to display the NEXT date that the charts will be available.
My output is:
Today is: 06/08/2023
Current Cycle Date: 05/18/2023
Time for new charts.
I'm ...
1
vote
3
answers
121
views
XPath that returns true when at least one element matches
Let's assume we have the following XML response:
<People>
<Person>
<Age>29</Age>
</Person>
<Person>
<Age>25</Age>
</...
0
votes
1
answer
1k
views
how to fill input value onclick via xpath
i want to fill input value with click function, like this
<script>
function inputfillclick() {
document.getElementById('inputidx').value="KuchBhi"
}
</script>
<input type=&...
1
vote
2
answers
384
views
xpath 2.0 - How do you calculate the sum of calculated values?
CLM Doc Gen High-Level ExplainedSample of my xml, below. For each 'Part' Nodeset, I am multiplying Cost by Qty (Cost * Qty). That works just fine at the nodeset level. I am trying to SUM all the (...
1
vote
1
answer
232
views
click on xpath using javascript delay after element clicked
i am working on xpath script, i want to work it like that it will keep loking for xpath every 1 second and when element/xpath is found it will click the element and then wait for 5 second then again ...
0
votes
2
answers
99
views
Xpath to find an element present inside two different self closing tags
My correct XML is:
<xml>
<astart/>
<a>XXX</a>
<bstart/>
<x>..</x>
<y>..</y>
<b>AAA</b>
<...
0
votes
1
answer
49
views
Button click using combination of text and id Robit framework
In robit framework i am doing a button click based on text but i want to add ID also as the page has multiple button with same text
path="//button[text()=open]
Here i want to add id also
what to ...
3
votes
3
answers
191
views
Is there a way to split a string in fixed width chunks in XPath?
Using xidel I'm extracting the //Assertion//Signature//KeyInfo//X509Certificate/text() from a SAMLResponse, this is a X509 certificate as a long base64 string.
I want to split this string into 64 ...
-1
votes
2
answers
500
views
how to write xpath for getting h4 , h5 and span in selenium c#
<div class="card-header bg-info">
<h4>Dumpytext</h4>
<h5> Dump text/ mg
<span style="font-size: 0.9rem;">(100mg/ 50mg)</span>
</h5>
<...
0
votes
1
answer
79
views
The Xpath command returns the datetime value instead of the correct value
I want to return the text inside the a tag(for googlesheet IMPORTXML function), but instead of returning the correct value, another value is returned that is not known from where it is loaded.
This is ...
0
votes
1
answer
1k
views
XPath string-join with apostrophs for dynamic value set
i want to use XPATH to join a string. Actually i have a XML Structure like this:
<root>
<employee>
<employeePayrollID>1234567</employeePayrollID>
</employee>
<...