Read specific data from an API

I am using arduino YUN to access an API. I have used the WiFi client example and can access the desired API I was wondering if it would be possible to return specific data such as weather condition instead of all of the data stored on the API

#include <Bridge.h>
#include <HttpClient.h>

void setup() {
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();//initialises bridge
  Serial.begin(9600);
  while(!Serial);
}

void loop() {
  HttpClient client;
  client.get("http://api.openweathermap.org/data/2.5/weather?q=birkenhead&mode=xml");//API URL to be accessed by client 

  while (client.available()) {
    char c = client.read();
    Serial.print(c); 
  }
  Serial.flush();

  delay(5000);
}

any help would be appreciated thanks in advance

I can not give specific directions. If the data on the web server is a know format (e.g. JSON string object), then you maybe able to retrieve the data by a key value. I have just encounter it and still trying to understand how to use it. You may want to look at the sites www.w3schools.com and www.json.org. This will require you to split the HTML code from the Audino sketch. The linux side of the Yun does have a web client that maybe able to help. I wish I could help more, but I am at the limit of my knowledge.

I hope this is a help.

LGodfrey:
::::SNIP:::: I was wondering if it would be possible to return specific data such as weather condition instead of all of the data stored on the API
::::SNIP::::
any help would be appreciated thanks in advance

LGodfrey,
your questions is not clear? Are you asking about the API you are accessing? If so, that depends on the API.
Otherwise, your question is not clear.

Jesse

I'm guessing you want to take the data from the XML file and parse out specific nodes and attributes?

Since this is the Yun forum, id suggest using a process instead of a http request directly from the yun itself. you can use php or python to curl your api and parse the object then assemble a String from the results you want.

If you have any experience with c I'd personally write a class that would create a process to the api and parse out the xml and save each param as a variable that you can reference through the lifecycle of the program.

You can find examples online of how to do this with php or python, you just have to make sure your Yun has the required libraries. ie. php json / xml etc