Quantcast
Viewing latest article 2
Browse Latest Browse All 3

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

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 latest article 2
Browse Latest Browse All 3

Trending Articles