Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

extractValue and "undeclared" default namespace xmlns=""

28499Jul 26 2005 — edited Aug 4 2005
Hi,

we log responses from a 3rd party web service in the database. Some values of the response are extracted via extractValue() and stored in a database table for further processing.

(1) Up to now the XML looked something like (I removed all the SOAP stuff for clearness):

<ns1:root xmlns:ns1="tempuri.org/namespace1">
<sub1>
<value>some value</value>
</sub1>
</ns1:root>

and with extractValue(..., '//value') we could retrieve "some value".
Note that there is a namespace defined for <ns1:root> but the node we access uses the default namespace.

(2) Now they updated their application server and the response now looks like this:

<ns1:root xmlns:ns1="tempuri.org/namespace1/" xmlns="">
<sub1>
<value>some value</value>
</sub1>
</ns1:root>

This is nearly the same except that with xmlns="" the default namespace gets "undeclared". Now extracting the values no longer works, extractValue(..., '//value') results in NULL.

How do we need to call extractValue to get "some value" now?

TIA,
Stefan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2005
Added on Jul 26 2005
4 comments
727 views