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

Can I select in XPath based on a variable attribute?

I think this isn't possible but would like to have a definitive answer. XML: French ... My Book Me XPath 101
DannykPowell
  • 1,227
  • 5
  • 18
  • 30
4
votes
2 answers

XPath: difference between "//*[contains(.,'sometext')]" and "//*[contains(text(),'sometext')]"

I want to clearly understand what is the difference between the following XPath expressions "//*[contains(.,'sometext')]" and "//*[contains(text(),'sometext')]". From this great answer I understand, that text() returns a set of individual nodes,…
Prophet
  • 32,350
  • 22
  • 54
  • 79
4
votes
2 answers

Return nodes that have siblings that start-with substring of self

I'm trying to come up with a clean Xpath 1.0 expression in Excel's FILTERXML() function to return nodes with the following requirement: The node must have a sibling (following) that starts with the exact same three characters of itself. The point…
JvdV
  • 70,606
  • 8
  • 39
  • 70
4
votes
2 answers

How to find elements through text ignoring the case using Selenium and Xpath

I'm using java version "1.8.0_191" and selenium 3.141.59. I'm trying to find out if a page contains the word "error" or "erreur". Also, I want it to be case insensitive. Finding a text is easy: List elementList =…
BelovedFool
  • 435
  • 6
  • 17
4
votes
2 answers

Extract, create and append using xpath and telegram instant view