easypo.xsd - Purchase Order Test XML Schema


What is the Purchase Order Test XML Schema, easypo.xsd?

✍: FYIcenter.com


easypo.xsd is a test XML Schema represents a typical purchase order. It is included in the \fyicenter\xmlbeans-2.6.0\schemas folder, if you have XMLBeans-2.6.0.zip installed as described in the previous tutorial:


  <xs:element name="purchase-order">
        <xs:element name="customer" type="po:customer"/>
        <xs:element name="date" type="xs:dateTime"/>
        <xs:element name="line-item" type="po:line-item" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="shipper" type="po:shipper" minOccurs="0" maxOccurs="1"/>

  <xs:complexType name="customer">
      <xs:element name="name" type="xs:string"/>
      <xs:element name="address" type="xs:string"/>
    <xs:attribute name="age" type="xs:int"/>
    <xs:attribute name="moo" type="xs:int" default="100"/>
    <xs:attribute name="poo" type="xs:int" fixed="200"/>

  <xs:complexType name="line-item">
      <xs:element name="description" type="xs:string"/>
      <xs:element name="per-unit-ounces" type="xs:decimal"/>
      <xs:element name="price" type="xs:decimal"/>
      <xs:element name="quantity" type="xs:integer"/>

  <xs:complexType name="shipper">
      <xs:element name="name" type="xs:string"/>
      <xs:element name="per-ounce-rate" type="xs:decimal"/>


You see 4 complex element types defined in easypo.xsd: purchase-order, customer, line-item, and shipper. See the next tutorial on how to compile these XML data types into Java data types.


scomp - Compile XML Schema to Java Data Types

xpretty - Print XML in Pretty Format

Using Apache XMLBeans in Java Programs

⇑⇑ FAQ for Apache XMLBeans JAR Library

2018-01-13, 1803🔥, 0💬