MappingDocument doc = new MappingDocument(false);
MappingElement parentNode = doc.addChildElement(new MappingElement("parentNode")); //$NON-NLS-1$
parentNode.setSource("parentNodeSource"); //$NON-NLS-1$
MappingElement childNode = parentNode.addChildElement(new MappingElement("childNode"));//$NON-NLS-1$
MappingAttribute attribute = new MappingAttribute("attributename"); //$NON-NLS-1$
childNode.addAttribute(attribute);
attribute.setDefaultValue("ddd"); //$NON-NLS-1$
attribute.setValue("fff"); //$NON-NLS-1$
MappingRecursiveElement recursiveElement = (MappingRecursiveElement)childNode.addChildElement(new MappingRecursiveElement("recursivenodename", "parentNodeSource"));//$NON-NLS-1$ //$NON-NLS-2$
recursiveElement.setRecursionLimit(8, false);
recursiveElement.setCriteria("rrr"); //$NON-NLS-1$
String savedXML = saveMappingDocument(doc);