Hello,
I have a quick question about XMLType and how to extract values from it... I have one with many namespaces like this one:
WITH T AS (
SELECT
'
<project xmlns="http://www.test.com/xid/v2">
<Node>NodeValue</Node>
<Content>
<Document:Document xmlns:Document="http://other.domain.be/prj/types/prj/file/1" xmlns="http://other.domain.be/prj/types/prj/file/1">
<Details>
<Id type="Local">123456</Id>
<Id type="Remote">654321</Id>
</Details>
</Document:Document>
</Content>
</project>
' x
FROM dual
)
SELECT ExtractValue(XMLType(x), '/project/Node', 'xmlns="http://www.test.com/xid/v2"'),
ExtractValue(XMLType(x), '/project/Content/Document/Details/Id[@type="Local"]', 'xmlns="http://www.test.com/xid/v2"')
FROM t;
And when I try to extract Local Id of a document, it always returns null. Any idea why? I'm using Oracle 11.2;
Thank you for your help.