Questions tagged [xpath-1.0]

Use this tag for questions specific to XML Path Language (XPath) version 1.0

W3C Recommendation:


Online Training

A 70-minutes "Crash Course in XPath" module is available as part of the Pluralsight video-course "XSLT 2.0 and 1.0 Foundations", by Dimitre Novatchev


410 questions
0
votes
1 answer

How do I produce the required XML output grouping and sorting by like source nodes?

Given this source XML: 001 1 2 5 4
DonBoitnott
  • 10,787
  • 6
  • 49
  • 68
0
votes
1 answer

Selecting Values in XPath depending on values at same level

I've got this partial XML VALUE1 FOO BAR
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
1 answer

concat each two nodes

I'm having the following html code:
1
2
3
4
5
6
7
8
Now I want to concatenate each dt and dd tag, is that possible with xpath 1.0? So the results…
Erik van de Ven
  • 4,747
  • 6
  • 38
  • 80
0
votes
2 answers

Current node position Xpath 1.0

How can I get current node position in Xpath 1.0? I'm trying /position() but it's not working. I also tried /@position().
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
1 answer

XPath 1.0 COUNT - Unique values

I've got this test XML: y31 y32 y31 y32
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
1 answer

XPath 1.0: convert ss to minutes, seconds

How can I convert seconds to minutes:seconds in XPath 1.0? For example: source: 80 output of query should be 1 minute, 20 seconds
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
1 answer

XPath 1.0 Iterate ordering by UTCSeconds

I have this sample XML: 1406538933 My second value
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
2 answers

Time string comparison in XPath 1.0

I've got this comparison in XPath1.0: number(substring(translate(translate(translate(@pub-date,'-',''),':',''),' ','') ,5,4)+substring(translate(translate(translate(@pub-date,'-',''),':',''),'…
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
1 answer

XPath1.0: Convert UTC Seconds to datetime format string

Is there a way of converting UTC seconds to a String with this format: dd/mm/yyyy hh:mm:ss?
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
1 answer

Xpath: Select property depending on other property's value

I have this [partial] XML: 1378314024 ABC1234
D. Caan
  • 1,907
  • 6
  • 22
  • 36
0
votes
2 answers

Match first table cell, extract the second

I have a table and want to extract data from some data cells. s which have which href contains string "xxx"?
How to use xpath to get all the
s which contains with href containing string "xxx"? ....... ............
ca9163d9
  • 27,283
  • 64
  • 210
  • 413
0
votes
1 answer

Need an optimized xpath expression to get the desired nodesets

I do have a sample XML file :- The Weather Pattern Weather Man 100.00 Weaving Patterns
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317

Liu Kang
  • 1,359
  • 4
  • 22
  • 45
0
votes
1 answer

Need xpath 1.0 to match an option with an id like "recipients-5342647-address"

I'm having trouble with the syntax for an xpath query in php that tries to match an html select element that has an id attribute in the following format: recipients-1234567-address The numeric part of the id will change and may not always be the…
minorgod
  • 652
  • 6
  • 7
0
votes
2 answers

XPath 1.0 - How can I get the minimum value in my selection of elements?

Example of file (exercise based on itunes xml file) : Major Version1 Minor Version1 ... 219
Zephou
  • 11
  • 2
0
votes
1 answer
......
......