Page 1 of 1

Trouble with XPathDocument

PostPosted: Sat Mar 07, 2009 4:16 pm
by Caligari
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

Re: Trouble with XPathDocument

PostPosted: Sat Mar 07, 2009 7:18 pm
by Charles
I'm investigating.

Re: Trouble with XPathDocument

PostPosted: Sat Mar 07, 2009 8:12 pm
by Charles
Fixed in development with a regression test case so it doesn't happen again. If you're using a workspace, you can "svn up" and run the installation again.

If you're using the last informal release, I'll be cutting a new one soon.

Re: Trouble with XPathDocument

PostPosted: Sun Mar 08, 2009 8:22 am
by Charles
There is a new informal release at http://cobra-language.com/downloads/ with this fix.