Comments (5)
I have the same problem and have to go down the elements until I get to the element I want:
ONOXMLElement *dataElement = [[[[[[[[[document.rootElement.children firstObject] children] firstObject] children] firstObject] children] firstObject] children] firstObject];
Here are some details about the problem:
"The ‘gotcha’ moment with our response message is that the namespace “xmlns=http://ws.cdyne.com/WeatherWS/” does not have a prefix for the declaration. By not defining a prefix, it is defaulting to the default namespace or null namespace and we cannot use XPath expressions to reference the null namespace."
http://blog.inin.com/a-quick-primer-on-soap-xml-and-xpath/
from ono.
Hi @mattt,
What is the status of this issue? It seems like I'm experiencing it too.
Regards,
Chalk
from ono.
Apologies for not responding sooner, everyone. I'm not very familiar with SOAP, but I'd like to make any necessary fixes for this in code and/or documentation. I'll add the example you provided, @tosbaha, as a failing test case in a branch and work to figure out a solution.
"The ‘gotcha’ moment with our response message is that the namespace “xmlns=http://ws.cdyne.com/WeatherWS/” does not have a prefix for the declaration. By not defining a prefix, it is defaulting to the default namespace or null namespace and we cannot use XPath expressions to reference the null namespace."
In the meantime, have you tried calling the definePrefix:forDefaultNamespace
as a workaround?
from ono.
Sorry but this issue was so old. I don't work on this anymore. I think I made it work by stripping the name spaces. Since I don't have the old code anymore, I can't comment whether your workaround works or not. Cheers.
from ono.
I've tested this by calling definePrefix:forDefaultNamespace
, however, XPath queries still returns nil
from ono.
Related Issues (20)
- WatchOS HOT 2
- XCode 7.1 "include of non-modular header inside module 'Ono.Ono'" HOT 3
- not work with ![CDATA[xxxx]] HOT 8
- CSS selector does not work for some queries HOT 3
- Build error in XCode7.1 HOT 5
- Memory leak in firstChildWithXPath/enumerateElementsWithXPath when no element found HOT 3
- compile error on ONOHTMLTests.m with Xcode 7.1.1 HOT 1
- Build fails with Carthage HOT 1
- any plan to add support for tvOS? HOT 2
- How to use it without cocopods
- why textNode isn't child node
- i use Ono Parse the web issues ! HOT 1
- get the absolute path HOT 1
- How can I get value from tags from <dc:title> HOT 1
- 1
- warnings when building with -Weverything HOT 3
- this is a very strange question
- migrate to Swift5 HOT 2
- Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
- How to use :nth-of-type()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ono.