Parsing and Programmatically Constructing XML
The Oracle XML Parser for Java is an amazing little piece of software. It provides everything we need to:
Parse XML documents and DTDs
Validate XML documents against a DTD
Programmatically construct and manipulate XML documents
Search XML documents using XPath expressions
Transform XML documents using XSLT stylesheets
By the end of this chapter, we’ll have done all these tasks, but in the next few sections we focus on the first three. First, let’s make sure we’ve got the latest version of the Oracle XML Parser for Java software and that it’s properly installed in your Oracle8i database.
Installing Oracle XML Parser for Java
To verify that the Oracle XML Parser for Java is properly installed in your Oracle8i database, do the following:
Connect to your Oracle8i database with SQL*Plus:
sqlplus xmlbook/xmlbook
Check the status of the
oracle.xml.parser.v2.DOMParserclass by running the following SQL statement:SELECT SUBSTR(dbms_java.longname(object_name),1,30) AS class, status FROM all_objects WHERE object_type = 'JAVA CLASS' AND object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
If you see the result:
CLASS STATUS ------------------------------ ------- oracle/xml/parser/v2/DOMParser VALID
then the Oracle XML Parser for Java is already installed and ready to be used. You do not need to complete any further installation steps.
If instead you see the SQL*Plus no
rows
selected message, complete the following steps to install the Oracle ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access