Svar: Re: [xml] XPath problem with namespaces

No, it doesn't work. About the only _expression_ I can get to work is something like //*. This will return the Envelope (as expected) node as the first node in the result. The namespace for this node is SOAP-ENV (also as expected).
It probabely shouldn't matter but I'm using the Pascal port of LibXML2.
- Erik

>>> Igor Zlatkovic<igor zlatkovic com> 07-06-2004 20:14:03 >>>
On 07.06.2004 19:06, Erik F. Andersen wrote:
> Hi!
> I'm trying to get an understanding of XPath and are having problems getting things to work. I have basically been looking everywhere for an example of how to use namespaces with XPath and XMLLib2 without much success. My XML looks (something) like this:
> <?xml version="1.0"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV=""
> xmlns:xsd="" xmlns:xsi=""
> xmlns:SOAPENC="">
> <SOAP-ENV:Body
> SOAP-ENV:encodingStyle=""
> wsu:Id="Id-59ef0d9b-1ac6-4fff-85cb-3f52ec95c47c"
> xmlns:wsu="">
> <NS1:GetFormularArray xmlns:NS1="urn:AesSoapServiceIntf-IAesSoapService">
> All I want to do now is to select the SOAP-ENV:Body element but I haven't been able to figure out how to to this yet! Can anyone please tell me what the correct syntax for XPath is to do this?

in your document it is


or a somwhat slower variant


Doesn't that work?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]