Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Small Problem with extract and XML data
Hello,
here is the setup (smal test I created):
A table with a CLOB column (data) with the following content:
<root>
<child>Child 1</child>
</root>
SELECT data FROM theTable returns the above XML.
I get an error with the following expression:
SELECT extract(XMLType(data), '/root') FROM theTable;
ORA-31011: XML parsing failed
Looking at the example given in the Oracle manual, I would expect
<child>Child 1</child> to be returned.
The error description says "Check if the document to be parsed is valid." but as far as I can tell the XML is valid (wellformed)
Strangely enough, the following is working:
SELECT extractvalue(XMLType(data), '/root/child') FROM theTable;
If the XML wasn't valid, this should fail as well, right?
What am I missing here?
This is with Oracle 9.2.0.7.0 running on a Linux box.
Regards
Thomas
-- It's not a RootKit - it's a SonyReceived on Fri May 05 2006 - 04:14:47 CDT