Pages: [1]   Go Down
Author Topic: XML with Arduino?  (Read 879 times)
0 Members and 1 Guest are viewing this topic.
manchester
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Miramar Beach, Florida
Online Online
Faraday Member
**
Karma: 115
Posts: 5388
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

manchester
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
 
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Billroy do you have an XML example to show me.
No, I don't.

-br
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11195
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: