Top "Xpath" questions

The primary purpose of XPath is to address parts of an XML document.

XPath contains(text(),'some string') doesn't work when used with node with more than one Text subnode

I have a small problem with Xpath contains with dom4j ... Lets say my XML is <Home> <…

xpath dom4j
How to use XPath contains() here?

I'm trying to learn XPath. I looked at the other contains() examples around here, but nothing that uses an AND …

xml xpath
Select values from XML field in SQL Server 2008

Just looking at my XML field, my rows look like this: <person><firstName>Jon</firstName&…

sql-server xml xpath
Extract value of attribute node via XPath

How can I extract the value of an attribute node via XPath? A sample XML file is: <parents name=…

xml xpath
How to select the first element with a specific attribute using XPath

The XPath bookstore/book[1] selects the first book node under bookstore. How can I select the first node that matches …

xpath
How to read XML using XPath in Java

I want to read XML data using XPath in Java, so for the information I have gathered I am not …

java xml parsing xpath
Getting attribute using XPath

Given an XML structure like so: <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <…

xml xpath
How can I match on an attribute that contains a certain string?

I am having a problem selecting nodes by attribute when the attributes contains more than one word. For example: <…

xpath
How can I find an element by CSS class with XPath?

In my webpage, there's a div with a class named Test. How can I find it with XPath?

html css xml xpath
Is there a way to get element by XPath using JavaScript in Selenium WebDriver?

I am looking for something like: getElementByXpath(//html[1]/body[1]/div[1]).innerHTML I need to get the innerHTML of elements using …

javascript selenium selenium-webdriver xpath document.evaluate