XMLReader with Cerbuino Bee 'System.NotSupportedException'

I am running the following code on my Cerbuino Bee and get System.NotSupportedException on XmlReader.Create. This code works fine on my Panda II board.

Debug.Print("Program Started"); StorageDev.MountSD(); FileStream rms = new FileStream(@ "\SD\test.xml", FileMode.Open, FileAccess.Read, FileShare.None); XmlReaderSettings ss = new XmlReaderSettings(); ss.IgnoreWhitespace = true; ss.IgnoreComments = true; XmlReader xmlr = XmlReader.Create(rms, ss);

Using mainboard GHI Electronics FEZCerbuinoBee version 1.2
Program Started
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader.XmlReader’
Step into: Stepping over non-user code 'System.Xml.XmlReader.XmlReader’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Collections.ArrayList.ArrayList’
Step into: Stepping over non-user code 'System.Collections.ArrayList.ArrayList’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Collections.Stack.Stack’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlNameTable.XmlNameTable’
Step into: Stepping over non-user code 'System.Xml.XmlNameTable.XmlNameTable’
Step into: Stepping over non-user code 'System.Xml.XmlNameTable.XmlNameTable’
Step into: Stepping over non-user code 'System.Xml.XmlNameTable.XmlNameTable’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader_XmlNode.XmlReader_XmlNode’
Step into: Stepping over non-user code 'System.Xml.XmlReader_XmlNode.XmlReader_XmlNode’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
WARN: Total initialization time exceeds 10 seconds.
: ProgramStarted is blocking execution, which means events and timers will not run properly.
: Make sure not to use blocking code such as while(true) - use a GT.Timer instead.
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader_NamespaceEntry.XmlReader_NamespaceEntry’
Step into: Stepping over non-user code 'System.Xml.XmlReader_NamespaceEntry.XmlReader_NamespaceEntry’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
Step into: Stepping over non-user code 'System.Xml.XmlReader_NamespaceEntry.XmlReader_NamespaceEntry’
Step into: Stepping over non-user code 'System.Xml.XmlReader_NamespaceEntry.XmlReader_NamespaceEntry’
Step into: Stepping over non-user code 'System.Xml.XmlReader.Create’
A first chance exception of type ‘System.NotSupportedException’ occurred in System.Xml.dll
An unhandled exception of type ‘System.NotSupportedException’ occurred in System.Xml.dll

The following is the test XML I am using.

<?xml version="1.0" encoding="utf-8" ?>

<NETMF_DataLogger>
Data
txt
10
</NETMF_DataLogger>

Any ideas? Thank you.

NotSupportedException usually means that it is not implemented. So interface is there (as part of the NetMF) but it is not implemented in Cerbuino firmware.

I hope that’s not the case. Is there a way to know definitively? I am calling web services and want to be able to parse through XML files. Any suggested alternatives?

@ Mickpat - Do you have a Thread.Sleep(TimeOut.TillTheEndOfTime) or While(true) ?

No, I don’t have a wait statement.

@ Mickpat - Can you post the full code.

Sure, I will post the full code tonight, but the only code not included in my original post is the Using statements. I currently don’t have any code after the create statement.

@ Mickpat - I have a horrible suspission its not supported in 4.2…

Unfortunately, XML is not currently supported at this time on the Cerb-Family boards.

Is there an alternative solution to parse? Lack of XML makes consuming web services much more difficult. Thanks.

Also, is there documentation that details what is implemented and what is not? Thank you.

Unfortunately there is no one place where that information is kept up to date. Various release notes, and update announcements on the forum.

As far as alternative way. Check if your service can produce json. There is json library on codeshare:

http://www.tinyclr.com/codeshare/entry/357

Thanks. I will give that a try.