Home » Developer & Programmer » JDeveloper, Java & XML » selecting xml data
selecting xml data [message #91846] Tue, 15 April 2003 00:54
Messages: 1
Registered: April 2003
Junior Member
Hi All,
I am newbie to XMLDB. I was working with sample programs available on otn.

I executed the scripts given below.

create table po_tab(
id number,
po sys.XMLType
xmltype column po
XMLSCHEMA "http://www.oracle.com/PO.xsd"
element "PurchaseOrder";

insert into po_tab values (1,
xmltype(<PurchaseOrder xmlns="http://www.oracle.com/PO.xsd"
<Company>Oracle Corp</Company>
<Part>9i Doc Set</Part>
<Part>8i Doc Set</Part>

I have registered the schema successfully.
Now while working with SQL Plus i tried the following stmts:
(1)select existsnode(po, '/PurchaseOrder/Item') from po_tab; THIS RETURNS A VALUE 0.

(2)select existsnode(po, '/PurchaseOrder') from po_tab; THIS RETURNS A VALUE 1.

What is the problem here with the XPATH expression in (1)? Whenever am trying to check the existence of child elements it fails...
Without this basic test, i cannot proceed to verify the function of Extract(), ExtractValue() etc.

Appreciate replies from esteemed users...

Previous Topic: Can Oracle (Oracle XML parser) validate XML documents containing XDR?
Next Topic: Access control& memory alloction for java stored procedure
Goto Forum:

Current Time: Thu Jul 29 23:18:47 CDT 2021