I'm using .Net 2.0, and need to SelectSingleNode
from my XmlDocument
regardless of namespace, as wrong headed as that may sound.
to be specific
XmlElement slipType = (XmlElement)document.SelectSingleNode("//Provenance1");
will set slipType
to null since I don'l know th namespace Provenance1 is in at the time of the query.
You can check the local-name of the element and ignore namespace with the following XPath expression:
//*[local-name()='Provenance1']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With