My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 10: XPath doesn't function at all for when retrieving .NET web service data
2 people starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Owner:  ----
Closed:  Apr 2008


 
Reported by mdes...@gmail.com, Apr 23, 2008
What steps will reproduce the problem?
1. Call any .NET webservice
2. Query the resulting XMLDocument with nodesForXPath


What is the expected output? What do you see instead?
It is expected that [theNodes count] would be equal to or greater than 1 if
the node exists but it is always 0.

What version of the product are you using? On what operating system?
Current SVN version;

Please provide any additional information below.
Example .NET web service:

http://www.webservicex.net/WeatherForecast.asmx/GetWeatherByZipCode?ZipCode=92024

Example nodesForXPath that doesnt work:

Call theNodes = [theXMLDocument nodesForXPath:@"StateCode" error:&theError];
 
Apr 23, 2008
Project Member #1 jwight
"Works as intended"

The XML you provided has an XML namespace. Internally we're using the libxml2 xpath function. This function, 
this doesn't work quite the same way as NSXMLDocument namespaces and you need to manually specify the 
namespace mappings yourself. See: https://code.google.com/p/touchcode/issues/detail?id=4

Apr 23, 2008
Project Member #2 jwight
See CXMLNode_XPathExtensions.h for the new method that allows you to specify the mapping.

Apr 23, 2008
#3 mdes...@gmail.com
Awesome.  I got it working with no issues now.  Thanks for the incredibly fast
response and I apologize for not finding that on my own.
Apr 23, 2008
Project Member #4 jwight
My pleasure. I need to do a better job documenting the new method(s).
Status: Duplicate
Labels: TouchXML

Powered by Google Project Hosting