* @return MappingNode root of mapping doc
*/
private static MappingNode createXMLPlanNested() {
MappingDocument doc = new MappingDocument(true);
MappingElement root = new MappingElement("Catalogs"); //$NON-NLS-1$
doc.addChildElement(root);
MappingSequenceNode sequence = new MappingSequenceNode();
MappingElement cats = sequence.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
MappingElement items = cats.addChildElement(new MappingElement("Items")); //$NON-NLS-1$
MappingSequenceNode sequence0 = items.addSequenceNode(new MappingSequenceNode());
MappingElement item = sequence0.addChildElement(new MappingElement("Item")); //$NON-NLS-1$
item.setSource("xmltest.group.items"); //$NON-NLS-1$
item.setMaxOccurrs(-1);
item.addAttribute(new MappingAttribute("ItemID", "xmltest.group.items.itemNum")); //$NON-NLS-1$ //$NON-NLS-2$
MappingSequenceNode sequence1 = item.addSequenceNode(new MappingSequenceNode());
sequence1.addChildElement(new MappingElement("Name", "xmltest.group.items.itemName")); //$NON-NLS-1$ //$NON-NLS-2$
sequence1.addChildElement(new MappingElement("Quantity", "xmltest.group.items.itemQuantity")); //$NON-NLS-1$ //$NON-NLS-2$
//NESTED STUFF======================================================================
MappingElement nestedWrapper = new MappingElement("Suppliers"); //$NON-NLS-1$
MappingSequenceNode sequence2 = nestedWrapper.addSequenceNode(new MappingSequenceNode());
MappingElement supplier = sequence2.addChildElement(new MappingElement("Supplier")); //$NON-NLS-1$
supplier.setSource("xmltest.suppliers"); //$NON-NLS-1$
supplier.setMaxOccurrs(-1);
supplier.addAttribute(new MappingAttribute("SupplierID", "xmltest.suppliers.supplierNum"));//$NON-NLS-1$ //$NON-NLS-2$
MappingSequenceNode sequence3 = supplier.addSequenceNode(new MappingSequenceNode());
sequence3.addChildElement(new MappingElement("Name", "xmltest.suppliers.supplierName")); //$NON-NLS-1$ //$NON-NLS-2$
sequence3.addChildElement(new MappingElement("Zip", "xmltest.suppliers.supplierZipCode")); //$NON-NLS-1$ //$NON-NLS-2$
//NESTED STUFF======================================================================
sequence1.addChildElement(nestedWrapper);
root.addSequenceNode(sequence);
return doc;