Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
Using XSQL Servlet, 8 of 24
With the XSQLCommandLine Utility you can post XML to the XSQL page it is processing (typically, for inserting into the database) by specifying the filename or URL of the XML to be posted as the value of the posted-xml command line parameter. For example, posted-xml=filename or posted-xml=http://somesite/someurl are both valid.
Custom action handlers can now refer to the content of the posted XML document any number of times necessary when calling getPageRequest().getPostedDocument(). Previously, the second time calling this returned null.
The XSQLRequest class, the programmatic API to process XSQL Pages from within Java programs, now has a processToXML() method, allowing you to process the XSQL Page and get it's output as a DOM Document object, ready for subsequent processing by your program.
Process any XSQL page at the command line by using the XSQLCommandLine() class, sending the output to standard out or to a file, using the command:
java oracle.xml.xsql.XSQLCommandLine xsqlURI [outputFile] [param1=value1 ... paramN=valueN]
The following files are provided to run the Command Line Utility:
These set up the CLASSPATH to contain all JAR files required (same ones listed for the Servlet above), and then calls JRE to run oracle.xml.xsql.XSQLCommandLine()
class.
Try these XSQLCommandLine Utility example:
xsql xsqlURI [outputFile] [param1=value1 ... paramN=valueN]
xsql airport.xsql airport=sfo xml-stylesheet=none
xsql airport.xsql output.html airport=sfo
xsql insertnewsstory.xsql posted-xml=http://p.moreover.com/cgi-local/page?index_xml+xml
This uses the XSQL Page named insertnewsstory.xsql
to insert the XML contents retrieved by visiting the named URL.
|
Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|