Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!news.in2p3.fr!in2p3.fr!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Thomas Kellerer <BDHLDUUTPRWS@spammotel.com>
Newsgroups: comp.databases.oracle.misc
Subject: Small Problem with extract and XML data
Date: Fri, 05 May 2006 11:14:47 +0200
Lines: 41
Message-ID: <4c0jc8F13i9arU1@individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net UCzEU/Dsm+52PMc9CjOGSQ1Seg+FpjKF2qELW2y7n8UyzyDHw=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Thunderbird/1.5.0.2 Mnenhy/0.7.4.0
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:127144

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 Sony
