Examples of PurchaseOrderDocument


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

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

    }

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

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

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

        // 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

Examples of prePostFeature.xbean.readOnlyBean.purchaseOrder.PurchaseOrderDocument

        return new TestSuite(FixedAttrTest.class);
    }

    public void test()
    {
        PurchaseOrderDocument poDoc;

        poDoc = PurchaseOrderDocument.Factory.newInstance();
        PurchaseOrderType po = poDoc.addNewPurchaseOrder();


        int LEN = 20;

        Items.Item[] it = new Items.Item[LEN];
        for (int i = 0; i < LEN; i++)
        {
            it[i] = Items.Item.Factory.newInstance();
            it[i].setUSPrice(new BigDecimal("" + 4));
        }
        Items items = Items.Factory.newInstance();
        items.setItemArray(it);
        po.setItems(items);


        String sExpected = "<pur:purchaseOrder xmlns:pur=\"http://xbean.prePost_feature/readOnlyBean/PurchaseOrder\"/>";


        it[0].setPrice(10);

        assertEquals(sExpected, poDoc.xmlText());

        assertTrue(!poDoc.validate());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.