Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

XML Reader Whoas


  • Please log in to reply
3 replies to this topic

#1 Bendage

Bendage

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts
  • LocationIrvine, CA

Posted 28 March 2012 - 03:46 AM

Hello everyone, I have been bangin my head on this for a few hours tonight. It appears the XMLReader is not supported with the Netduino. Everything I try keeps throwing a SystemNotSupported Exception. What Xml is supported? Is there any way to parse the following Xml file from an SD card? It's small enough. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ProjectName" value="TestProject" /> <add key="Debug" value="true" /> <add key="ConnectionType" value="Serial" /> <add key="ConnectionString" value="PortName=COM1;BaudRate=9600;Parity=None;Databits=8;TimeOut=10;Stopbits=One;" /> </appSettings> </configuration>

#2 H07R0D

H07R0D

    Advanced Member

  • Members
  • PipPipPip
  • 95 posts

Posted 28 March 2012 - 02:25 PM

My understanding is it's not an issue of the size of the XML file, it's the size of the XMLReader object. It's just too big to fit in the space available.

I've taken to using JSON for all my config data instead of XML, as it's a lot smaller, and I've got a full parser you can grab here
I should mention that the code is written for the 4.2 Framework, so if you're not running the 4.2 firmware, that code won't compile for you.

#3 Bendage

Bendage

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts
  • LocationIrvine, CA

Posted 28 March 2012 - 03:59 PM

Thank you for the reply. Ya that seems to be what I've read everyone is doing... just sucks that's all. Was hoping for some nice small footprint xml parsing class somebody frustrated like me threw together. Thanks for the JSON parser. Guess I need to find a .Net C# JSON to XML converter

#4 minotaur

minotaur

    New Member

  • Members
  • Pip
  • 2 posts

Posted 28 March 2012 - 05:15 PM

You could read the XML file(s) using Regular Expressions. They are supported in the new firmware from what I've read but i have not tested it myself. http://forums.netdui...3-all-editions/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.