{
// 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));
}