I am trying to extract a value from an xml element, located in an XMLTYPE column in an Oracle Table. The xml element which I am trying to extract have a parent for which a namespace is defined. The xml looks something like:
<a>
<b xmlns="urn:www.someSite.com/myModel">
<c>my value</c>
</b>
</a>
If I want to extract the content of the "a" element, its context is correctly returned:
SELECT Extract(myColumn, '/a') FROM myTable;
But for returning the content of the "c" element I didn't succeed to find any version to work. The following instructions does not work:
SELECT Extract(myColumn, '/a/b/c') FROM myTable;
SELECT Extract(myColumn, '/a/b/c', 'xmlns="urn:www.someSite.com/myModel"') FROM myTable;
SELECT Extract(myColumn, '/a/b/c', 'urn:www.someSite.com/myModel') FROM myTable;
Can anybody help me, with the extract statement that would work in this case?