blob: 33ac8056ced227e090da625b17a84f02da653e2c [file] [log] [blame]
Sample: SchemaEnum
Author: Steven Traut (
Last Updated: Aug. 11th, 2004
This sample illustrates how you can access XML values that are
defined in schema as enumerations. When a schema containing
enumerations is compiled, the generated Java types represent the
schema enumerations with Java enumerations. You can access these through
their constants and corresponding int values.
When you run this sample, you'll see it print three blocks of information:
- The XML it got from the PurchaseOrder.xml file.
- The XML it generated by taking data from the PurchaseOrder.xml file and
copying it into a new XML document created from another schema.
- A few lines of data extracted from the newly generated XML file.
To try out this sample:
1. Set XMLBEANS_HOME in your environment
2. Ant must be on your PATH
3. To compile the schemas and sample source, run "ant build"
4. To execute the sample, run "ant run"