Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Some newbie xml questions

RE: Some newbie xml questions

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Mon, 11 Oct 2004 22:09:01 +0200
Message-ID: <2CF83791A616BB4DA203FFD13007824A018D0D46@MSXVS02.trivadis.com>


Hi Alan

>So far so good. But no matter what I try, I can't seem to figure out
>how to extract ItemNumber, "Part Id", Quantity, or UnitPrice. Do the
>extract and path strings not work properly for elements without proper
>tags around them?? =20

"elements without proper tags around" are called "attributes".=20 To access them you should add a "@", e.g.:

select extract(value(d),'/LineItem/Part/@Id').getstringval() from test_po p, =
table(xmlsequence(extract(p.po_xml,'/PurchaseOrder/LineItems/LineItem')))=  d
where p.po_id =3D 1

>Does the validation methods work when validating an xml file against a
>schema definition (xsd) file?

Never had problem with it.

>Its possible that the xsd file in the Oracle docs has errors, so I will
>have to look at it in more detail.

Mhmm... I always develop my XML schemas with XML Spy... therefore they = are always valid...
I suggest you to carefully check your XML schema before the = registration.

>What are some of the performance issues that you have seen in regards =
to
>XML files? For an upcoming project, I will be dealing with xml files
>~17MB in size for an upcoming project. =20

If you want to speed-up selects you should store the XML as = object-relational. In this case you should carefully choose the physical = implementation of the collections (varray or nested tables?).

If you want to speed-up loads you should store the XML as LOB.

>How do I index the po_xml column
>to better handle information retrieval? Do I create function based
>indexes using the extract() methods for those paths that I will be =
going
>after?

Yes. Another possibility, if you use object-relational, is to directly = create the indexes on the object tables. Notice that the CBO is able to = perform query rewrites on them, i.e. if you have a select with the = extract() function it is able to use an index created on the underlying = object tables. The opposite is true as well.

Good luck
Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 11 2004 - 15:04:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US