Top "Selectsinglenode" questions

Selects the first Xml Node that matches the XPath expression

Why is SelectSingleNode returning null?

I'm working with an XML document that contains a structure that looks similar to this: <MT> <Events&…

c# xml xmldocument xml-attribute selectsinglenode
System.Xml.XPath.XPathException: Expression must evaluate to a node-set when executing SelectSingleNode("//(artist|author)")

Can somebody explain me why is this not working? I'm executing XmlNode xmlNode = xmlDocument.SelectSingleNode("//(artist|author)"); and I get …

c# xml xpath selectsinglenode
selectSingleNode using vbscript

Below is the structure of my xml file: <configuration> <appSettings> <add key="ProductVersion" value="5.5.5"/> &…

xml vbscript selectsinglenode
Html Agility Pack SelectSingleNode giving always same result in iteration?

I would like the nodes in the collection but with iterating SelectSingleNode I keep getting the same object just node.…

c# html html-agility-pack selectsinglenode
SelectSingleNode and namespace - can't find nodes (using namespace mgr)

I have a relativly complex xml message I am recieving from a partner company. I need to parse up the …

c# xml selectsinglenode
Parsing XML: Colon in my element causes XPath to miss it

I have an XML document that I load in and try to search with XPath. The root node in this …

c# xml xpath selectsinglenode
C# Using XPATH to select specific element with known values, then delete

I am new to xpath in C# and I am trying to select an element that has two specific values. …

c# xml xpath selectsinglenode
SelectSingleNode always returns null?

Taking this simplifed example of my XML: <?xml version="1.0"?> <message xmlns="http://www.mydomain.com/MyDataFeed" xmlns:…

c# xml xpath namespaces selectsinglenode