Is this Immpossible !!
smuench at us.oracle.com
Wed Oct 20 08:05:29 BST 1999
If you're looking for a class library in Java that
will handle all of the SQL-to-XML rendering for you,
check out the Oracle XML SQL Utility at:
Given any JDBC connection "conn" and
any SQL query "q" you can do:
OracleXMLQuery oxq = new OracleXMLQuery(conn,q);
String result = oxq.getXMLString();
to get the query results as a String, or
String resultWithDTD = oxq.getXMLString(true);
to get the query results as a String (with a dynamic DTD
Document xmlDoc = oxq.getXMLDOM();
to get the query results as an in-memory DOM Document
This is a robust implementation that works for any
valid SQL construct Oracle supports (including user-defined
structures and complex, dynamic object views) but
when working against another database will work fine
against its SQL as long as you have a JDBC driver for it.
The Oracle XSQL Servlet (new release out today, also
available at same URL) adds a convenient "page processing"
layer on top of this XML SQL utiltity to very easily
server XML documents based on multiple SQL statements
in a "datapage". The "datapage" can be returned as
a datagram over the web, or transformed using XSLT into
XML, HTML, or text by supplying an appropriate stylesheet
processing instruction in your "datapage".
Believe you'll find these do exactly what you're looking
for, depending on whether you want programmatic control
(XMLSQL) or simple way to deploy new data services without
Steve Muench, BC4J Development Team & XML Evangelist
----- Original Message -----
From: Abhishek Srivastava <abisheks at india.hp.com>
To: xml dev mailing list <xml-dev at ic.ac.uk>
Sent: Tuesday, October 19, 1999 10:28 PM
Subject: Is this Immpossible !!
I have the following requirement. A client wants to query a database. It
sends out an SQL Query to the Database server. At the server side, instead
of returning a recordset, it returns an XML File.
The client on receiving the XML file, parsers it for "Validity" (to be sure
that all elements it had asked for are there).
Problem is that at the server side, How to build the xml document.
Presently, I am doing something like this
String("<Name>") + rs.getField("auName") + String("</Name>")
However, this is a very inelegant approach as the code is full of such
Is there a more elegant solution to this ? All the material on XML talks
about parsing and reading XML. What about writing them ? Are there DOM / SAX
Api extensions available that would
create "VALID" XML documents without clutter in the code ?
Any help would be greatly appreciated.
Thanks & Best Regards,
_/ Abhishek Srivastava
_/ Hewlett Packard ISO
_/_/_/ _/_/_/ -------------------
_/ / _/ _/ (Work) +91-80-2251554 x1190
_/ _/ _/_/_/ (Ip) 220.127.116.11
_/ (Url) http://sites.netscape.net/abhishes/homepage
_/ You've heard it all by now. Get wired or get whacked.
You're networking or you're not working. Dot-com or die
- SUN MICROSYSTEMS
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev