These samples are located in UNIX directory: sqllib/samples/xml/jdbc and Windows directory: sqllib\samples\xml\jdbc.
Type of XML sample | Sample program name | Program description |
---|---|---|
Administration | XmlSchema.java | Register the XML schema to the database and use the registered schema to validate and insert an XML document. |
XmlRunstats.java | Perform RUNSTATS on a table containing XML type columns. | |
XmlIndex.java | Create an index and use it in an XQuery. | |
XmlConst.java | Create an index with UNIQUE and VARCHAR length constraints using XML patterns. | |
XsUpdate.java | Update a registered XML schema ensuring that the original and the new schemas are compatible. | |
Application Development | XmlInsert.java | Insert an XML document into a column of XML datatype. |
XmlMdc.java | Moves data from MDC to non-MDC tables and use of block indexes, global indexes, and faster insertion and deletion. | |
XmlUdfs.java | Pass the XML data type as an input parameter, and return values when using scalar functions, sourced functions, SQL-bodied UDFs and table UDFs. | |
XmlUpDel.java | Update and delete XML documents in the tables. | |
XmlRead.java | Read XML data stored in tables. | |
RelToXmlDoc.java | Create an XML document directly from data stored in relational tables using SQL/XML publishing functions | |
RelToXmlType.java | Create an XML document from relational and XML data using SQL/XML publishing functions. | |
XmlDecomposition.java | Decompose data stored in an XML file and insert the data into tables. Specify the order of insertion to be used during XML document shredding. | |
RecXmlDecomp.java | Register a recursive XML schema to the XSR and enable it for decomposition. | |
Simple_XmlProc.java | Simple stored Procedure with XML type parameters | |
Simple_XmlProc_Client.java | Client program to call the routine in Simple_XmlProc.java. | |
Simple_XmlProc_Create.db2 | CLP script to register the stored procedure in Simple_XmlProc.java | |
Simple_XmlProc_Drop.db2 | CLP script to drop the stored procedure in Simple_XmlProc.java | |
XmlToTable.java | Insert the data from an XML document into relational tables using SQL/XML functions like XMLTABLE, XMLEXISTS and XMLQUERY. | |
XmlTrig.java | Use the trigger processing capability for enforced automatic validation of incoming XML documents. | |
XmlCheckConstraint.java | Create tables with check constraints on an XML column using IS VALIDATED and IS NOT VALIDATED predicates and specify one or more schemas using the ACCORDING TO XMLSCHEMA clause. |