[Mono-list] System.NullReferenceException: Object reference not set to an instance of an object

Sascha Manns Sascha.Manns at mailbox.org
Tue Feb 7 18:55:30 UTC 2017


Hi David,

Am Dienstag, den 07.02.2017, 11:19 -0500 schrieb David Curylo:
> Sascha,
> Because of xmlns=“http://docbo…” in the outer ‘info’ node, you need
> to specify that namespace with SelectSingleNode.  To do so, you
> also need an XmlNamespaceManager.
> 
> var nsmgr = new
> XmlNamespaceManager(xmlDoc.NameTable);nsmgr.AddNamespace(“whatever",
> "http://docbook.org/ns/docbook");var productNumberNode =
> doc.SelectSingleNode(“//whatever:productnumber", nsmgr);
> 
That works perfectly. Thank you very much.

Greetings
Sascha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-list/attachments/20170207/7d331e2d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.dot.net/pipermail/mono-list/attachments/20170207/7d331e2d/attachment.sig>


More information about the Mono-list mailing list