Subject: Re: Creating an xml doc from another xml doc via xsl From: "Steve Muench" <smuench@xxxxxxxxxxxxx> Date: Sun, 9 Apr 2000 22:02:20 -0700 |
| I tried the select query you posted, but I'm not sure I understand what | it is doing. How can I get the at the data returned from this query via | a ResultSet in Java as, from the example output you showed, its not | flat, but hierarchical (which is good, I'm just unsure how to reap the | rewards). Instead of calling getString(1) like you would do get the 1st column as as string value, you call: getCursor(1) which gets the column as a JDBC ResultSet. The CURSOR() operator creates a column value that *itself* is a (nested) result set. | I am at this moment searching for documentation for that as well. See... http://technet.oracle.com/doc/oracle8i_816/server.816/a76989/express2.htm#1002628 and search for "Cursor expressions" heading. | Is this query returning xml or a typical result or something else? The *query* returns a result set of rows each of which has two scalar column values and one result-set column value. The XML SQL Utility being used under the covers by the XSQL Page Processor is doing the ResultSet-to->XML work for you. | Do I need to use your XSQL pages? No. XSQL Pages just make tying SQL, XML, and XSLT together very easy instead of writing code to do it. If you find yourself writing your 20th Java program to: -> Produce XML from SQL Query results -> Transform the results using XSLT then you'll appreciate the work you can do declaratively with XSQL Pages, but it's clearly not necessary since the XSQL Page Processor is built on top of the other lower-level Oracle XML Developer's Kit components like the Oracle XML Parser, Oracle XSLT Processor, and the Oracle XML SQL Utility. | Is there a class I can include so I can manipulate this data within | my own servlets? Sure. Download the Oracle XML SQL Utility from our technet.oracle.com/tech/xml homepage, and use the OracleXMLQuery class. It works against any JDBC driver. Against Oracle8i it handles every supported datatype and database feature (object views, materialize views, etc.). OracleXMLQuery oxq = new OracleXMLQuery(yourConnection, yourSQL); Document d = oxq.getXMLDOM(); // to return results as a DOM tree or String s = oxq.getXMLString(); // to return results as XML "text" | Do I need to use Oracle's xsl/xml parsers or can I stick with | xalan/xerces from Apache? The internals of the OracleXMLQuery class leverage the Oracle XML Parser's DOM implementation, but if Xalan can work with a DOM Document, then you can continue to use Xalan. ______________________________________________________________ Steve Muench, Lead XML Evangelist & Consulting Product Manager Business Components for Java & XSQL Servlet Development Teams Oracle Rep to the W3C XSL Working Group XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Creating an xml doc from anothe, Matthew Cordes | Thread | Re: Creating an xml doc from anothe, Matthew Cordes |
Re: Creating an xml doc from anothe, Matthew Cordes | Date | Execute HTML depending on node valu, James Brown |
Month |