Oracle9i Application Developer's Guide - XML Release 1 (9.0.1) Part Number A88894-01 |
|
This appendix describes the XDK for Java specifications and cheat sheets for each XML component for Java. The cheat sheets list the main APIs, classes, and associated methods for each XDK for Java component.
This appendix contains the following sections:
Table C-1 and Table C-2 list XML Parser for Java top level classes with a brief description of each. The following tables summarize other XML Parser for Java classes:
Not all the XML Parser for Java methods are listed in the foregoing tables.For the detailed reference documentation see:
Note:
Table C-1 XML Parser for Java: oracle.xml.parser.v2 Classes
Table C-2 XML Parser for Java: DOMParser() Methods
Oracle XML Parsers are provided with Oracle9i Enterprise and Standard editions from release 8.1.6 and higher. If you do not have these editions you can download the XML Parsers from: http://otn.oracle.com/tech/xml/
These sections describe how to install the Windows NT and UNIX versions of the XML Parser for Java, Version 2.
To install the Oracle XML Parser for Java (v2) on Windows NT follow these steps:
To install the XML Parser for Java (v2) in UNIX follow these steps:
See Chapter 20, "Using XML Parser for Java", for sample code and suggestions on how to use the XML Parsers.
The Oracle XML Parser for Java, Version 2 specifications follow:
Operating Systems: Any with Java 1.1.x support
JAVA: JDK 1.1.x. or above.
The contents of both the Windows and UNIX versions are identical. They are simply archived differently for operating system compatibility and your convenience.
Documentation for Oracle XML Parser for Java is located in the doc/ directory in your install area.
The readme.html file in the root directory of the archive contains release specific information including bug fixes, API additions, and so on.
Oracle XML Parser is an early adopter release and is written in Java. It will check if an XML document is well-formed and, optionally, if it is valid. The parser will construct a Java object tree which can be accessed. It also contains an integrated XSLT processor for transforming XML documents.
The parser conforms to the following W3C Recommendations:
The parser also conforms to the following W3C Proposed Recommendations:
In addition, the parser implements the following interfaces defined by the XML development community:
The XML Parser for Java currently supports the following encodings:
UTF-8 is the default encoding if none is specified. Any other ASCII or EBCDIC based encodings that are supported by the JDK may be used.However, they must be specified in the format required by the JDK instead of as official character set names defined by IANA.
The parser also provides error recovery. It will recover from most errors and continue processing until a fatal error is encountered.
Version 2 of the XML Parser for Java, besides incorporating an XSLT processor, has been re-architected from version 1. This has resulted in a number of changes to the class names especially those that support Namespaces. The following summarizes changes you have to take into account when converting code from v1 to v2.
oracle.xml.parser package has been renamed to oracle.xml.parser.v2.
The following are new interfaces:
The following interfaces have been removed:
The following are new classes in v2:
Table C-3 lists the XDK for Java classes that have been reorganized.
Table C-12 summarizes the XML Schema Processor for Java's classes, constructors, and methods.
See Also:
|
Oracle XML Class Generator for Java requires Oracle XML Parser for Java. The XML Document, printed by the generated classes, confirms to the W3C recommendation for Extensible Markup Language (XML) 1.0. Oracle XML Class Generator can optionally generate validating Java source files. It also optionally generates Javadoc comments in the source files.
Oracle XML Class Generator supports the following encodings for printing the XMLDocument:
UTF-8, UTF-16, ISO-10646-UCS-2, ISO-10646-UCS-4, US-ASCII, EBCDIC-CP-US, ISO-8859-1, and Shift_SJIS.
ASCII is the default encoding if none is specified. Any other ASCII or EBCDIC based encodings that are supported by the JDK can be used.
Installing the Oracle XML Java Class Generator, is described in the following sections.
To install Oracle XML Class Generators on Windows NT, follow these steps:
http://otn.oracle.com/tech/xml
This Class Generator for Java uses 63KB. Select the following:
C:\[your directory]>unzip xmlclassgenV1_0_0.zip
To install Oracle XML Class Generator for Java in UNIX, follow these steps:
http://otn.oracle.com/tech/xml
This Class Generator for Java uses 63Kb. Select the following:
#gzip -dc xmlclassgenV1_0_0.tar.gz | tar xvf -
Table C-12 lists the main XML Class Generator for Java APIs and top level classes with a brief description of each. Table C-13lists the XML Class Generator for Java methods.
oracg
invokes the DTD or Schema Class Generator for Java to generate classes based on DTD and Schema respectively, depending on the input arguments given. Table C-14lists the oracg arguments.
You can download XSQL Servlet distribution from:
http://otn.oracle.com/tech/xml/xsql_servlet
To extract the contents of XSQL Servlet distribution, do the following:
UNIX:
tar xvfz xsqlservlet_v1.0.2.0.tar.gz
Windows NT:
pkzip25 -extract -directories xsqlservlet_v1.0.2.0.zip
using the pkzip25 command-line tool or the WinZip visual archive extraction tool.
XSQL Servlet comes bundled with the Oracle Web-to-go server that is pre-configured to use XSQL Pages. The Web-to-go web server is a single-user server, supporting the Servlet 2.1 API, used for mobile application deployment and for development. This is a great way to try XSQL Pages out on your Windows machine before delving into the details of configuring another Servlet Engine to run XSQL Pages.
Note: The Web-to-go Web server is part of Oracle's development and deployment platform for mobile applications. For more information on Web-to-go, see http://www.oracle.com/mobile. |
Windows NT users can get started quickly with XSQL Pages by following these steps:
If you get an error starting this script, edit the xsql-wtg.bat file to properly set the two environment variables JAVA and XSQL_HOME to appropriate values for your machine.
REM ---------------------------------------------- REM Set the 'JAVA' variable equal to the full path REM of your Java executable. REM ---------------------------------------------- set JAVA=J:\java1.2\jre\bin\java.exe set XSQL_HOME=C:\xsql REM ---------------------------------------------- REM Set the 'XSQL_HOME' variable equal to the full REM path of where you install the XSQL Servlet REM distribution. REM ----------------------------------------------
Then, repeat the two steps above.
If you get an error connecting to the database when you try the demos, you'll need to go on to the next section, then try the steps above again after setting up your database connection information correctly in the XSQLConfig.xml file.
The demos are set up to use the SCOTT schema on a database on your local machine (that is, the machine where the web server is running). If you are running a local database and have a SCOTT account whose password is TIGER, then you are all set. Otherwise, you need to edit the .\xsql\lib\XSQLConfig.xml
file to correspond to your appropriate values for username, password, dburl, and driver values for the connection named "demo".
<?xml version="1.0" ?> <XSQLConfig> : <connectiondefs> <connection name="demo"> <username>scott</username> <password>tiger</password> <dburl>jdbc:oracle:thin:@localhost:1521:ORCL</dburl> <driver>oracle.jdbc.driver.OracleDriver</driver> </connection> <connection name="lite"> <username>system</username> <password>manager</password> <dburl>jdbc:Polite:POlite</dburl> <driver>oracle.lite.poljdbc.POLJDBCDriver</driver> </connection> </connectiondefs> : </XSQLConfig>
UNIX users and any user wanting to install the XSQL Servlet on other web servers should continue with the instructions below depending on the web server you're trying to use. In every case, there are 3 basic steps:
The following lists the XSQL servlet specifications:
XSQL Servlet supports the following character set encodings:
Table C-15 and Table C-16 list XSQL Servlet APIs and top level classes with a brief description of each.
See Appendix H, "XML SQL Utility (XSU) Specifications and Cheat Sheets".
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|