Trouble with XPathDocument
Posted: Sat Mar 07, 2009 4:16 pm
First up, I'm not only new to Cobra, I'm also new to .NET, so I may well have a trivial problem here.
I'm experimenting with System.XML in Cobra, notably System.XML.XPath.
I've managed to get my namespaces sorted out and get a document read in, but I'm having some trouble accessing some parts of the XPathDocument class. When I try to createNavigator from an XPathDocument (which should give me an XPathNavigator, and does so from an XmlDocument), I get the following error:
error: Cannot find top level namespace "MS" of CLR type "MS.Internal.Xml.Cache.XPathNode".
I've included my (pretty much trivial) code. If you comment out the whole collectionPathDoc section it runs fine. In theory the collectionPathDoc should do the same as the above section, only with a faster, read-only XPathDocument.
(Note I haven't bothered to include the colletion.xml file, as its contents don't matter, as long as it can be opened and parsed - I'm not doing anything with it yet - any .xml file renamed should be fine.)
Any advice?
Take care,
Caligari
I'm experimenting with System.XML in Cobra, notably System.XML.XPath.
I've managed to get my namespaces sorted out and get a document read in, but I'm having some trouble accessing some parts of the XPathDocument class. When I try to createNavigator from an XPathDocument (which should give me an XPathNavigator, and does so from an XmlDocument), I get the following error:
error: Cannot find top level namespace "MS" of CLR type "MS.Internal.Xml.Cache.XPathNode".
I've included my (pretty much trivial) code. If you comment out the whole collectionPathDoc section it runs fine. In theory the collectionPathDoc should do the same as the above section, only with a faster, read-only XPathDocument.
(Note I haven't bothered to include the colletion.xml file, as its contents don't matter, as long as it can be opened and parsed - I'm not doing anything with it yet - any .xml file renamed should be fine.)
Any advice?
Take care,
Caligari