Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 10G XmlDB - Need for speed
Jon, I believe what you are wanting can be found in Oracle docs, document reference B10790-01, Title "Oracle XML DB Developers Guide", Chapter title "Java API for XMLTYPE".
The key Java class it seems is oracle.xdb.XMLType. The example code on pages 12-3 and 12-4 appears to fit your posting requirements.
Regards
Mike
TESSELLA Michael.OShea_at_tessella.com
__/__/__/ Tessella Support Services plc __/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England __/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301http://www.tessella.com Registered in England No. 1466429
jsvaughan_at_gmail.com wrote:
> Hi,
>
> Does anyone know how in 10g (10.1) xmldb I can query the resource_view
> by path and return the found document as an XmlType? What I want is to
> obtain the document as a Java W3C Document; XmlType has a getDOM method
> which would save me having to parse the character stream as below, and
> give me a bit of a speed up.
>
> Currently our query is:
>
> select extract(res, '/Resource/Contents/*').getClobVal() document from
> resource_view where equals_path(res, ?) = 1
>
> and we then do:
>
> Clob myClob = myResultSet.getClob(1);
> myDocument =
> XMLServices.getInstance().readDocument(myClob.getCharacterStream(),
> false);
>
> Where readDocument uses a javax.xml.parsers.DocumentBuilder to parse
> the doc.
>
> Any help very gratefully received
>
> Jon
Received on Sun May 29 2005 - 10:32:44 CDT