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
2
votes
2 answers

How can I use the concat() function on multiple children within an XPath expression

something like this works fine "concat('a', 'b')" but i can't it to work as part of an existing expression, i.e.
the one
//div[class='xyz']/concat(/strong/text(), /sub/text()) i'd like…
jayshilling
  • 331
  • 2
  • 4
  • 11
2
votes
1 answer

Xpath count non-empty descendants

Well, I have the next xml input: sub3 text How can I count non-empty text descendants of root…
Getodac
  • 119
  • 7
2
votes
3 answers

How do I select the shallowest matching elements with XPath?

Let's say I have this document. <a:B/> And I have an XmlNode set to the element. If I say A.SelectNodes( "//a:*",…
harpo
  • 41,820
  • 13
  • 96
  • 131
2
votes
2 answers

XPath (1.0) Match consecutive elements until specific child or end

This is for XPath 1.0. Here is an example of the mark up that I am matching against. The actual number of elements is not known ahead of time and thus varies, but following this sort of of pattern: