Re: [xml] XPath evaluation



"CAPRON Patrick" <capronpa e-i com> writes:

I have tried with the use of xmlXPathRegisterNs, but it doesn't work.
xmlXPathRegisterNs(xpathCtx, BAD_CAST "urn:ssp.ApplicationHeader$ahV10", BAD_CAST "")
xmlXPathRegisterNs(xpathCtx, BAD_CAST "urn:ssp.pm.GetAccount$camt.003.001.02", BAD_CAST "")
xmlXPathRegisterNs(xpathCtx, BAD_CAST "SwInt", BAD_CAST "")

It has the same behaviour...
/REQUEST/RequestPayload/Document doesn't work
/REQUEST/RequestPayload/*[name()='Document'] works fine

But after you've registered it you'll still need to refer to it.

The node:

  /REQUEST/RequestPayload/Document doesn't work

really DOES NOT exist. It's called:

  /REQUEST/SwInt:RequestPayload/otherns:Document 

Where otherns is a registered tag for the namespace for the node.

Geddit?


I have two questions for you to ask yourself:

- why do you refer to RequestPayload when it's marked up as
  SwInt:RequestPayload?

- has SwInt:RequestPayload got a namespace?


Nic



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