Examples of InventoryDocument


Examples of org.apache.xmlbeans.samples.cursor.mixedcontent.InventoryDocument

    {
        // Create an instance of this sample to work with.
        MixedContent sample = new MixedContent();

        // Create an schema type instance from the XML indicated by the path.
        InventoryDocument inventoryDoc = sample.parseXml(args[0]);

        // Validate the XML.
        boolean exampleIsValid = sample.validateXml(inventoryDoc);
        assert exampleIsValid;

        // Edit the XML, adding <link> elements to associate related items.
        InventoryDocument linkedResultDoc = sample.linkItems(inventoryDoc);

        // Validate the XML.
        boolean newXmlIsValid = sample.validateXml(linkedResultDoc);
        assert newXmlIsValid;
    }
View Full Code Here

Examples of org.apache.xmlbeans.samples.cursor.mixedcontent.InventoryDocument

    {
        // Create an instance of this sample to work with.
        MixedContent thisSample = new MixedContent();

        // Create an schema type instance from the XML indicated by the path.
        InventoryDocument inventoryDoc = thisSample.parseXml(args[0]);

        // Print what was received.
        System.out.println("Received XML: \n\n" + inventoryDoc.toString());

        // Edit the XML, adding <link> elements to associate related items.
        InventoryDocument linkedResultDoc = thisSample.linkItems(inventoryDoc);

        // Print the updated XML.
        System.out.println("XML with linked items: \n\n" + linkedResultDoc.toString());

        // Validate the result.
        System.out.println("New XML is valid: " +
                thisSample.validateXml(linkedResultDoc));
    }
View Full Code Here

Examples of org.apache.xmlbeans.samples.cursor.mixedcontent.InventoryDocument

    {
        // Get the XML instance into a file using the path provided.
        File inventoryFile = new File(xmlFilePath);

        // Create an instance of a type generated from schema to hold the XML.
        InventoryDocument inventoryDoc = null;
        try
        {
            // Parse the instance into the type generated from the schema.
            inventoryDoc = InventoryDocument.Factory.parse(inventoryFile);
        } catch (XmlException e)
View Full Code Here

Examples of org.apache.xmlbeans.samples.cursor.mixedcontent.InventoryDocument

    {
        // Create an instance of this sample to work with.
        MixedContent thisSample = new MixedContent();

        // Create an schema type instance from the XML indicated by the path.
        InventoryDocument inventoryDoc = thisSample.parseXml(args[0]);

        // Print what was received.
        System.out.println("Received XML: \n\n" + inventoryDoc.toString());

        // Edit the XML, adding <link> elements to associate related items.
        InventoryDocument linkedResultDoc = thisSample.linkItems(inventoryDoc);

        // Print the updated XML.
        System.out.println("XML with linked items: \n\n" + linkedResultDoc.toString());

        // Validate the result.
        System.out.println("New XML is valid: " +
                thisSample.validateXml(linkedResultDoc));
    }
View Full Code Here

Examples of org.apache.xmlbeans.samples.cursor.mixedcontent.InventoryDocument

    {
        // Get the XML instance into a file using the path provided.
        File inventoryFile = new File(xmlFilePath);

        // Create an instance of a type generated from schema to hold the XML.
        InventoryDocument inventoryDoc = null;
        try
        {
            // Parse the instance into the type generated from the schema.
            inventoryDoc = InventoryDocument.Factory.parse(inventoryFile);
        } catch (XmlException e)
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.