Questions tagged [xpathquery]
55 questions
1
vote
1 answer
DOMDocument xpath query cut off withing a specific timeframe ?
is there a way to cut of the query and return back the results.. preset time to take to get all images from the given url .. i.e. query half of the webpage ? or job time not greater than 5 seconds, so therefore, it will get everything it can in 5…

dean jase
- 1,161
- 5
- 23
- 38
1
vote
2 answers
xpath query to check if all xml element have same value
I have the following xml
-
001
A
-
002
A
-
003
…

James Taylor
- 79
- 8
1
vote
1 answer
XPath query for change structure of xml document
I have xml file with data:
9223372016900023061
fish
available
…
1
vote
2 answers
Combining 2 XPath Queries [@attribute and last()]
I have an XML document that has multiple instances of 'User Area' node as below:
2022-01-27
…

AlliDeacon
- 1,365
- 3
- 21
- 35
1
vote
1 answer
Is using OPENXML() the best way to transform data in an XML Column to Rows and Columns?
I have a SQL Server table with a column of type XML. The XML data represents multiple allowable selections for a given field. An example of the XML data is as follows.
Valid Value 1
Valid Value 2
…

Owen Brunker
- 13
- 2
1
vote
1 answer
Xidel: How to choose only 1 from many same value/class and remove unneeded elements from the result?
xidel -se '//strong[@class="n-heading"][1]/text()[1]' 'https://www.anekalogam.co.id/id'
will print out 3 same outputs
15 June 2020
15 June 2020
15 June 2020
so, what should I do in order to choose…

CuriousNewbie
- 319
- 4
- 13
1
vote
1 answer
xpath query ingore
|
and
I am trying to build a function which cleans all the elements with empty content or without attributes from HTML document and I want to igonre
and
tags. This is my current code.
and
tags. This is my current code.

Doralb5
- 15
- 6
1
vote
1 answer
PHP 7 DomDocument xpath query parent parameter
I'm trying to use eBaysvc.xsd not only to validate an xml but to build the xml itself:
therefore, passing as $API
AddDispute
I want to retrieve something like this xml:

Joe
- 1,033
- 1
- 16
- 39
1
vote
1 answer
php 7 DomDocument XML xpath->query get subnode values
I'm trying to extract some info from eBaysvc.wsdl:
passing API_Name I want to retrieve the Names of the Nodes required for such API and some more info
let's suppose we want to get AddDispute Nodes, AddDisputeNode has as first node...

Joe
- 1,033
- 1
- 16
- 39
1
vote
2 answers
php DOMDocument: how can I print an attribute of an element?
How do I print the an attribute of an element?
example:
$doc = new DOMDocument();
@$doc->loadHTML($page);
$xpath = new DOMXPath($doc);
$arts= $xpath->query("/td");
foreach ($arts as $art) {
// here i wanna print the attribute class of the td…

ufk
- 30,912
- 70
- 235
- 386
1
vote
1 answer
Fetching data from Wikipedia using Xpath Query function in Google Sheets ImportXML
What would be the correct Xpath query to use to fetch data from Wikipedia into Google Sheets?
Here is an example I would like to test this with:
Wikipedia page: http://en.wikipedia.org/wiki/12_Angry_Men_(1957_film)
Data to pull: the "running time"…

Steve
- 331
- 1
- 6
- 14
1
vote
1 answer
Iterate over all Xpath results
I have this code:
#!/usr/bin/groovy
import javax.xml.xpath.*
import javax.xml.parsers.DocumentBuilderFactory
def testxml = '''
..
..
…

Gilles Quénot
- 173,512
- 41
- 224
- 223
1
vote
1 answer
XPath Query: Find elements that have the same list of IDs as attributes
I need to come up with a query that gives the products of the types from which no items were sold Meaning if an item is of the type clothing, and no clothing items appear in the list of transactions, I need to display it.
This is my XML file…

CodyBugstein
- 21,984
- 61
- 207
- 363
1
vote
0 answers
XPathQuery replace html string
I`m using XPathQuery lib to find nodes in a HTML Post from Wordpress, but I need to replace the found node in HTML, can anyone help me?
Thanks.

Greg
- 141
- 2
- 8
1
vote
2 answers