Pages: [1]   Go Down
Author Topic: XML Library  (Read 329 times)
0 Members and 1 Guest are viewing this topic.
Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
Is there any XML Libraries for Arduino ethernet shield?
I'm looking to parse CAP data from NWS  here is a link to provide some
back around on the subject. http://wiki.citizen.apps.gov/nws_developers/index.php/Category:Common_Alerting_Protocol
thanks
Don
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4763
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not aware of any full-fledged XML parser (DOM isn't possible anyway, so SAX is a theoretical possibility). In my opinion this is because of the really restricted resources available on the Arduino. In 2kB of RAM you cannot do a lot of parsing or holding some call stack. Therefore most people search exactly the needed information from the XML files gathered from the internet and don't care about exact XML parsing.
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had that felling but I wanted to post it on the forum and see what everyone thought.
Here is a link to a message in my county here in Chicago,Il. is in Cook County
http://alerts.weather.gov/cap/wwaatmget.php?x=ILZ014&y=1 on you browser click view source.
Don
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4763
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Usually these messages always come in the same order, so you can just search through the stream till you find the opening tag you're interested in and read the string till the closing tag. Repeat for every information you need.
Logged

Pages: [1]   Go Up
Jump to: