Top "Xpath" questions

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

Using Xpath With Default Namespace in C#

I've got an XML document with a default namespace. I'm using a XPathNavigator to select a set of nodes using …

c# xml xpath namespaces xpathnavigator
xpath expression to remove whitespace

I have this HTML: <tr class="even expanded first> <td class="score-time status"> <a href="/…

xpath
How to use regex in selenium locators

I'm using selenium RC and I would like, for example, to get all the links elements with attribute href that …

regex xpath selenium selenium-rc
Get Nth child of a node using xpath

My sample input XML is: <root> <a> <b>item</b> <b&…

xml xpath
XPath to find elements that does not have an id or class

How can I get all tr elements without id attribute? <tr id="name">...</tr> <tr&…

xpath
Case insensitive XPath contains() possible?

I'm running over all textnodes of my DOM and check if the nodeValue contains a certain string. /html/body//text()[…

javascript html xml xslt xpath
Can I use a Regex in an XPath expression?

Something like .//div[@id='foo\d+] to capture div tags with id='foo123'. I'm using .NET, if that matters.

.net xml regex xpath
xpath: find a node that has a given attribute whose value contains a string

Is there an xpath way to find a node that has a given attribute whose value contains a given string? …

xml xpath contains
How to tell using XPath if an element is present and non empty?

I have an input XML something on this line: <Holding id="12"> <Policy> <HoldingForm tc="1">…

xml xpath mule
XPath to get another attribute by id attribute

I am using XPath to pull data off of a web page. I have a link that I want to …

xml xslt xpath