Thanks for the help,
In the end I used TextFinder.h to look for my values, works well and doesn't take up much space too.
// Boppyer
// A little programme to read values from a webserver
//
#include <Ethernet.h>
#include <SPI.h>
#include <TextFinder.h>
int pollDelay = 2000; // default these to 5000
//////////////////////////////////////////////////////////////////
// Ethernet vars
//////////////////////////////////////////////////////////////////
byte mac[] = {
0xDE, 0xAA, 0xBB, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 24, 94 }; // ethernet shield
byte gateway[] = { 192, 168, 24, 1 }; // router
//////////////////////////////////////////////////////////////////
// webserver
//////////////////////////////////////////////////////////////////
char urlAddress[90] = "GET /snow.xml HTTP/1.0";
////// snow.xml
////// <ID>24</ID><amount>2000</amount>
//////
byte server[] = { 192, 168, 24, 60 }; // server
Client client(server, 80); // s
TextFinder finder( client );
//////////////////////////////////////////////////////////////////
// Setup
//////////////////////////////////////////////////////////////////
void setup() {
Serial.begin(9600); // start the serial library:
Ethernet.begin(mac, ip, gateway); // start the Ethernet connection:
delay(1000); // give the Ethernet shield a second to initialize:
Serial.println("Starting up Controller...");
}
//////////////////////////////////////////////////////////////////
// Loop
//////////////////////////////////////////////////////////////////
void loop() {
if (client.connect()) {
Serial.println();
Serial.println("Connected");
Serial.println(urlAddress); // tests the url
client.println(urlAddress);
client.println();
}
else {
Serial.println(" connection failed");
}
if (client.connected()) {
// get the feild see if we need to snow
if(finder.find("<ID>") )
{
int snowID = finder.getValue();
Serial.print("I've found an ID: ");
Serial.println(snowID);
if(finder.find("<amount>") )
{
int amount = finder.getValue();
Serial.print("I've found an Amount: ");
Serial.println(amount);
}
}
else{
Serial.print("Could not find a Snow trigger");
}
}
else {
Serial.println("Disconnected");
}
client.stop();
Serial.println();
Serial.println("Client Stopped");
client.flush();
delay(pollDelay); // wait a minute before next update
}