Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
Using XML-SQL Utility (XSU), 8 of 26
To use the generation capabilities, call XSU with the getXML parameter. For example, to generate an XML document by querying the emp table under scott schema,
java OracleXML getXML -user "scott/tiger" "select * from emp"
This performs the following tasks:
getXML supports a wide range of options which are explained in the following section.
Used to specify the user name and password to connect to the database. If this is not specified, the user defaults to "scott/tiger". Note that he connect string is also being specified, the user name and password can be specified as part of the connect string.
Used to specify the JDBC database connect string. By default the connect string is: "jdbc:oracle:oci8:@"):
Instructs the XSU to generate the DTD along with the XML document.
Used to specify rowset tag (i.e. the tag that encloses all the XML elements corresponding to the records returned by the query) The default rowset tag is ROWSET. Specifying an empty string for the rowset tells the xsu to completely omit the rowset element.
Used to specify the row tag (the tag used to enclose the data coresponding to a database row). The default row tag is ROW. Specifying an empty string for the row tag tells the xsu to completely omit the row tag.
Used to name the attribute of the ROW element keeping track of the cardinality of the rows. By default this attribute is called "num". Specifying an empty string (i.e. "") as the row id attribute will tell the XSU to omit the attribute.
Used to specify that the value of one of the scalar columns from the query should be used as the value of the row id attribute.
Used to name the attribute of a XML list element keeping track of the cardinality of the elements of the list (note: the generated XML lists correspond to either a cursor query, or collection). Specifying an empty string (i.e. "") as the row id attribute will tell the XSU to omit the attribute..
Used to tell the XSU to use the attribute "NULL (TRUE/FALSE)" to indicate the nullness of an element.
Used to specify the stylesheet in the XML PI (Processing Instruction).
Used to specify the stylesheet type in the XML PI (Processing Instruction).
Used to specify the error tag -- the tag to enclose error messages which are formated into XML.
Used to tell the XSU to raise an exception if no rows are returned.
Used to specify the maximum number of rows to be retreived and converted to XML.
Used to specify the number of rows to be skipped.
Used to specify the characterset encoding of the generated XML.
Used to specify the date format for the date values in the XML document.
Used to specify the file name which contains the query or specify the query itself.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|