Constructing and validating an XML document
In this section we will construct an example XML document and dynamically validate the XML document with the example XML schema, catalog.xsd
, using the DOM 3 Validation API in XDK 11g that is included in JDeveloper 11g. We will be constructing the following XML document, catalog.xml:
<?xml version = '1.0' encoding = 'windows-1252'?> <catalog title="Oracle Magazine" publisher="Oracle Publishing"> <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>
The initial XML document that we will be modifying to construct the required XML document is...