easypo.xml - Purchase Order Test XML Document

Q

How to create an XML document based on the Purchase Order Test XML Schema, easypo.xsd? I want to test XMLBeans XML parsing functions.

✍: FYIcenter.com

A

If you want to test XMLBeans XML parsing functions, you can create the following Purchase Order Test XML Document, easypo.xml, manually:

<purchase-order xmlns="http://openuri.org/easypo">
    <customer>
        <name>Gladys Kravitz</name>
        <address>Anytown, PA</address>
    </customer>
    <date>2003-01-07T14:16:00-05:00</date>
    <line-item>
        <description>Burnham's Celestial Handbook, Vol 1</description>
        <per-unit-ounces>5</per-unit-ounces>
        <price>21.79</price>
        <quantity>2</quantity>
    </line-item>
    <line-item>
        <description>Burnham's Celestial Handbook, Vol 2</description>
        <per-unit-ounces>5</per-unit-ounces>
        <price>19.89</price>
        <quantity>2</quantity>
    </line-item>
    <shipper>
        <name>ZipShip</name>
        <per-ounce-rate>0.74</per-ounce-rate>
    </shipper>
</purchase-order>

Validate the XML document with the XML Schema:

\fyicenter\xmlbeans-2.6.0>.\bin\svalidate schemas\easypo.xsd easypo.xml

easypo.xml valid. (156 ms)

 

EasyPoXmlParser.java - Parse XML to Java Objects

SchemaCompiler - Call XML Schema Compiler Directly

Using Apache XMLBeans in Java Programs

⇑⇑ FAQ for Apache XMLBeans JAR Library

2017-07-07, 1801🔥, 0💬