Setting the environment
First, we need to create an application and a project in JDeveloper 11g. Select File|New to create an application. In the New Gallery window select Categories|General and Items| Generic Application. Click on the OK button. In the Create Generic Application window specify an Application Name (DOM3Validation
for example) and click on Next. In the Name your Generic Project window specify a Project Name (DOM3Validation
) and click on OK. An application and a project get added to the Application Navigator.
To validate an XML document with the DOM 3.0 Validation API we need to add the libraries/JAR files required for the DOM 3 Validation application. Select Tools|Project Properties. In the Project Properties window select Libraries and Classpath. Click on Add Library to add the Oracle XML Parser v2 library. Click on the OK button.
We shall be constructing an XML document and validating the document with an XML schema, catalog.xsd
, which is listed as follows:
<?xml version...