Forums

Trouble with XPathDocument

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Trouble with XPathDocument

Postby Caligari » 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
Attachments
XMLtext.cobra
Simple XML test
(621 Bytes) Downloaded 359 times
Caligari
 
Posts: 33

Re: Trouble with XPathDocument

Postby Charles » Sat Mar 07, 2009 7:18 pm

I'm investigating.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Trouble with XPathDocument

Postby Charles » Sat Mar 07, 2009 8:12 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Trouble with XPathDocument

Postby Charles » Sun Mar 08, 2009 8:22 am

There is a new informal release at http://cobra-language.com/downloads/ with this fix.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 57 guests