Setting the environment
In this chapter we shall load, save, and filter an XML document using the DOM 3 Load and Save API. The example XML document, catalog.xml
, is listed as follows:
<?xml version="1.0" encoding="windows-1252" ?><!--A Oracle Magazine Catalog--> <catalog publisher="Oracle Publishing" title="Oracle Magazine"> <journal date="March-April 2008"> <article section="Oracle Developer"> <title>Declarative Data Filtering</title> <author>Steve Muench</author> </article> </journal> <journal date="May-June 2008"> <article section="ORACLE DEVELOPER"> <title>On the PGA and Indexing Collections</title> <author>Steven Feuerstein</author> </article> </journal> </catalog>
We need to create a JDeveloper application (DOM3LS
) and a project (DOM3LS
) by selecting File|New and subsequently selecting Categories|General and Items|Generic Application in the New Gallery window. Add...