Package org.apache.xmlbeans.samples.substitutiongroup.easypo

Examples of org.apache.xmlbeans.samples.substitutiongroup.easypo.PurchaseOrderDocument


    {
        // Create an instance of this class to work with.
        SubstitutionGroup subGrp = new SubstitutionGroup();

        // Create an instance of a type based on the received XML's schema
        PurchaseOrderDocument poDoc = subGrp.parseXml(args[0]);

        // Validate it
        validateXml(poDoc);

        // Prints the comments from the XML, also the name of the substitute tokens.
View Full Code Here


    }

    public PurchaseOrderDocument parseXml(String file)
    {
        File xmlfile = new File(file);
        PurchaseOrderDocument poDoc = null;

        try
        {
            poDoc = PurchaseOrderDocument.Factory.parse(xmlfile);
        }
View Full Code Here

        // Create an instance of the sample to test.
        SubstitutionGroup sample = new SubstitutionGroup();

        // Create a schema type instance from the XML indicated by the path.
        SubstitutionGroup subGrp = new SubstitutionGroup();
        PurchaseOrderDocument poDoc = subGrp.parseXml(args[0]);

        // Validate the XML.
        assert sample.validateXml(poDoc);

        // Create a new document that adds two elements.
        PurchaseOrderDocument newDoc = sample.createDocument(poDoc, args[1]);

        // Validate the XML.
        assert sample.validateXml(newDoc);
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.samples.substitutiongroup.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.