Parsing data using GDataXMLDocument




{type:1 name:s:Envelope xml:"<s:Envelope
xmlns:s="http://ift.tt/sVJIaE"><s:Body><ValidateUserResponse
xmlns="http://Mobile/2011"><ValidateUserResult>false</ValidateUserResult
</ValidateUserResponse></s:Body></s:Envelope>"}


I have the following xml that I am trying to retrieve ValidateUserResult from. How would I go about doing this in XPath?


Ive already parsed the data using:


GDataXMLDocument *docc = [[GDataXMLDocument alloc] initWithData:data options:0 error:&error];


Then I tried


NSArray *resultNodes = [docc nodesForXPath:@"//s:Envelope/s:Body/ValidateUserResponse/ValidateUserResult" error:&error];


but I'm getting nil. What would the correct syntax be?


No comments:

Post a Comment