i want know if is possible, to get a specific element value of a xml file without use all delegate NSXMLParse method, i know that in OS X is possible with two simple line:
NSXMLDocument *xmlDoc = [[NSXMLDocument alloc] initWithData:connection.data options:0 error:nil];
NSString *time = [[xmlDoc rootElement] stringValueForXPath:@"./Time"];
is possible do the same thing in iOS? with few line?
thanks
XPath exists for iOS, as well. Here is a really great tutorial on using libxml2, XPath, and XML for parsing data.
With XPath, you're expected to pass in a clip query. For the following, XML, your clip query would be "//day":
<day>
Monday
</day>
<day>
Tuesday
</day>
...
<day>
Friday
</day>
This will give you an array of 5 dictionaries with node_name = day and node_content = the day of the week.