Quantcast
Channel: No Nodes Selected from Atom XML document using XPath? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by kdgregory for No Nodes Selected from Atom XML document using XPath?

$
0
0

While the C# implementation may allow default namespaces (I don't know), the XPath 1.0 spec doesn't. So, give "Atom" its own prefix:

nsMngr.AddNamespace("atom", "http://www.w3.org/2005/Atom");

And change your XPath appropriately:

XmlNode node = atom.SelectSingleNode("//atom:entry/atom:link/app:edited", nsMngr);

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>