Package org.apache.xmlbeans.samples.enumeration.schemaenum.easypo

Examples of org.apache.xmlbeans.samples.enumeration.schemaenum.easypo.PurchaseOrderDocument


        // Create an instance of this class to work with.
        SchemaEnum thisSample = new SchemaEnum();

        // Create an instance of a type based on the received XML's schema
        // and use it to print what the sample received.
        PurchaseOrderDocument poDoc = thisSample.parseXml(args[0]);
        System.out.println("Received XML: \n\n" + poDoc.toString());

        // Print the summarized items in XML based on a different schema.
        PriceSummaryDocument summaryDoc = thisSample.summarizeItems(poDoc);
        System.out.println("Summarized items: \n\n" + summaryDoc.toString());
View Full Code Here


     *         XML.
     */
    public PurchaseOrderDocument parseXml(String xmlFilePath)
    {
        File poFile = new File(xmlFilePath);
        PurchaseOrderDocument poDoc = null;
        try
        {
            poDoc = PurchaseOrderDocument.Factory.parse(poFile);
        } catch (XmlException e)
        {
View Full Code Here

     * based on the schema in inventory.xsd.
     */
    public static void main(String[] args)
    {
        SchemaEnum sample = new SchemaEnum();
        PurchaseOrderDocument poDoc = sample.parseXml(args[0]);

        boolean exampleIsValid = sample.validateXml(poDoc);
        assert exampleIsValid;

        // Create a new document that summarizes the PO doc.
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.samples.enumeration.schemaenum.easypo.PurchaseOrderDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.