5543eb9de8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1824563 13f79535-47bb-0310-9956-ffa450edef68 |
||
---|---|---|
.. | ||
schemas | ||
src/org/apache/xmlbeans/samples/enumeration | ||
xml | ||
build.xml | ||
README.txt |
Sample: SchemaEnum Author: Steven Traut (straut@bea.com) Last Updated: Aug. 11th, 2004 Versions: xmlbeans-1.0.3 xmlbeans-v2 ----------------------------------------------------------------------------- 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"