tagged [xpath]

Case insensitive XML parser in c#

Case insensitive XML parser in c# Everything you do with XML is case sensitive, I know that. However, right now I find myself in a situation, where the software I'm writing would yield much fewer erro...

29 Jan at 22:45

Select parent element of known element in Selenium

Select parent element of known element in Selenium I have a certain element that I can select with [Selenium](http://en.wikipedia.org/wiki/Selenium_%28software%29) 1. Unfortunately I need to click the...

17 Sep at 10:29

Using Xpath With Default Namespace in C#

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 Xpath as follows: I am not getting any results ba...

25 Feb at 12:34

LINQ to XML: applying an XPath

LINQ to XML: applying an XPath Can someone tell me why this program doesn't enumerate any items? Does it have something to do with the RDF namespace? ``` using System; using System.Xml.Linq; using Sys...

17 Oct at 20:6

Select values from XML field in SQL Server 2008

Select values from XML field in SQL Server 2008 Just looking at my XML field, my rows look like this: Note that these are three rows in my table. I'd like to return a SQL

22 May at 18:32

How do you parse an HTML string for image tags to get at the SRC information?

How do you parse an HTML string for image tags to get at the SRC information? Currently I use .Net `WebBrowser.Document.Images()` to do this. It requires the `Webrowser` to load the document. It's mes...

23 May at 12:17

XPath SelectNodes in .NET

XPath SelectNodes in .NET If i load the above XML into an XmlDocument and do a SelectSingleNode on A using the XPath query //C why does it return nodes from Under B when what I would expect to happen ...

15 Sep at 00:55

Selecting attribute values with html Agility Pack

Selecting attribute values with html Agility Pack I'm trying to retrieve a specific image from a html document, using html agility pack and this xpath: As far as I can see, it finds the src-attribute,...

12 Feb at 15:57

Selenium WebDriver findElement(By.xpath()) not working for me

Selenium WebDriver findElement(By.xpath()) not working for me I've been through the xpath tutorials and checked many other posts, hence I'm not sure what I'm missing. I'm simply trying to find the fol...

3 Dec at 11:28

Search XML file for nodes with specific attribute value in .NET 2

Search XML file for nodes with specific attribute value in .NET 2 I found answers for searching XML nodes using LINQ, but I am limited to C# with .NET 2. I want to open a single XML file (~50Kb, all s...

20 May at 16:5

Match conditionally upon current node value

Match conditionally upon current node value Given the following XML: How can I get "John Doe" from within the cu

16 Dec at 23:8

Get a value of an attribute by XPath and HtmlAgilityPack

Get a value of an attribute by XPath and HtmlAgilityPack I have a HTML document and I parse it with XPath. I want to get a value of the element input, but it didn't work. My Html: My code: ``` using H...

29 Dec at 16:20

XPath and XPathSelectElement

XPath and XPathSelectElement I have the following xml I've tried everything to read the name of the db2 (="Name2") with all possible combinations of XPath queries, but never get the expected result. M...

9 Jun at 17:25

How can I find the link URL by link text with XPath?

How can I find the link URL by link text with XPath? I have a well formed [XHTML](http://en.wikipedia.org/wiki/XHTML) page. I want to find the destination URL of a link when I have the text that is li...

17 Aug at 14:33

XPath doesn't work as desired in C#

XPath doesn't work as desired in C# My code doesn't return the node I'm pretty sure my XML and Xpath are correct. My Xpath : `/ItemLookupResponse/OperationRequest/RequestId` My XML : ```

6 Feb at 17:20

XSL substring and indexOf

XSL substring and indexOf I'm new to XSLT. I wonder if it is possible to select a substring of an item. I'm trying to parse an RSS feed. The description value has more text than what I want to show. I...

1 Dec at 18:35

How to select specified node within Xpath node sets by index with Selenium?

How to select specified node within Xpath node sets by index with Selenium? I'm writing a Selenium testcase. And here's the xpath expression I use to match all 'Modify' buttons within a data table. My...

9 Sep at 07:27

How do I get a NameTable from an XDocument?

How do I get a NameTable from an XDocument? How do I get a NameTable from an XDocument? It doesn't seem to have the NameTable property that XmlDocument has. EDIT: Judging by the lack of an answer I'm ...

26 Apr at 15:38

XmlNamespaceManager provided, but still get "Namespace Manager or XsltContext needed"

XmlNamespaceManager provided, but still get "Namespace Manager or XsltContext needed" i am trying to read the following and select a node in it . ``` XmlDocument document = new XmlDocument(); document...

12 Sep at 00:59

XmlNode.SelectSingleNode returns element outside current?

XmlNode.SelectSingleNode returns element outside current? my problem is like this. Let's say i have xml like this I have a method that get

28 Jan at 06:55

XPath and *.csproj

XPath and *.csproj I am for sure missing some important detail here. I just cannot make .NET's XPath work with Visual Studio project files. Let's load an xml document: Now execute my query: Of course,...

19 Sep at 08:34

Get content of XML node using c#

Get content of XML node using c# simple question but I've been dinking around with it for an hour and it's really starting to frustrate me. I have XML that looks like this: And all I want to do is use...

3 Jun at 15:23

problem getting xpath function ends-with() to work while contains() works fine

problem getting xpath function ends-with() to work while contains() works fine i am trying to get the tags that have an attribute that end with a certain id. like `` i want to get the spans that have ...

12 Aug at 15:22

"Expression must evaluate to a node-set."

"Expression must evaluate to a node-set." I have a problem My XML File is here: ``` Tarih 24.07.2013 18:59:45 USD 1.9120 1.9220 EUR 2.5280 2.5430

5 May at 13:10

How to verify an XPath expression in Chrome Developers tool or Firefox's Firebug?

How to verify an XPath expression in Chrome Developers tool or Firefox's Firebug? How can I verify my XPath? I am using Chrome Developers tool to inspect the elements and form my XPath. I verify it us...