|Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)
Part Number A86030-01
Introduction to Oracle XML, 23 of 27
One way to ensure that data obtained via a web form will map to an underlying database schema is to design the web form and its underlying structure so that it generates XML data based on a schema-compatible DTD. This section describes how to use the XML SQL Utility and the XML Parser for Java to achieve this. This scenario has the following flow:
You can use the DTD-generation capability of the XML SQL Utility to determine what XML format is expected by a target object view or table. To do this, you can perform a SELECT * FROM an object view or table to generate an XML result.
This result contains the DTD information as a separate file or embedded within the DOCTYPE tag at the top of the XML file.
Use this DTD as input to the XML Class Generator to generate a set of classes based on the DTD elements. You can then write Java code that use these classes to generate the infrastructure behind a web-based form. The result is that data submitted via the web form will be converted to an XML document that can be written to the database.