From oracle-l-bounce@freelists.org Mon Oct 11 15:04:33 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i9BK4Ww15355 for ; Mon, 11 Oct 2004 15:04:32 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i9BK4WI15350 for ; Mon, 11 Oct 2004 15:04:32 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5A59A72CB70; Mon, 11 Oct 2004 15:10:39 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25604-37; Mon, 11 Oct 2004 15:10:39 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B652772CAEC; Mon, 11 Oct 2004 15:10:38 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: RE: Some newbie xml questions Date: Mon, 11 Oct 2004 22:09:01 +0200 Message-ID: <2CF83791A616BB4DA203FFD13007824A018D0D46@MSXVS02.trivadis.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Some newbie xml questions Thread-Index: AcStbs6W+foePg3/TbicYy92jeWLrwCHfUMgAA/FFhA= From: "Christian Antognini" To: Cc: X-archive-position: 10931 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: Christian.Antognini@trivadis.com Precedence: normal Reply-To: Christian.Antognini@trivadis.com X-list: oracle-l X-Virus-Scanned: by amavisd-new at freelists.org 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