Go Down

Topic: XML with Arduino? (Read 1 time) previous topic - next topic

stefanosfok

Hi All,

I would like to ask you if I can use xml code in Arduino programming enviroment to sent the temperature measurement from two sensors to a web site using an Ethernet shield, or I can receive the temperature values from Arduino and then use xml coding from the web site programming part to get them.

Many Thanks!

SurferTim

I vote for this one:
Quote
...or I can receive the temperature values from Arduino and then use xml coding from the web site programming part to get them.


billroy

It is easy to send XML, JSON, or plain text from the Arduino over the internet.

It is a little tricky to parse received data in complex formats like XML on the Arduino.  (If there is an XML parser I'm not aware of it.)  In fact, many beginners find it hard enough parsing plain text.  So it might be best to use a simpler format than XML in this environment if your project permits it.


-br

stefanosfok

Thank you for your replies.
Currently I sent a string message with the temperatures from the website to the Arduino and then I sub string the message and use it.
Billroy do you have an XML example to show me. I am a begginer and I tottaly agree with
Quote
In fact, many beginners find it hard enough parsing plain text.

Thank you!

billroy

Quote

Billroy do you have an XML example to show me.

No, I don't.

-br

PeterH

Parsing would be relatively easy as long as you don't need to validate it and don't need to support namespaces or entities or any of that stuff. Just a hierarchical structure of tags and attributes following a simple and known schema would be easy enough to parse.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up