Element element = rootElement.addElement("childElement");
element.addAttribute("attributeName", "attributeValue");
element.addText("This is the text content of the element");
element.addCDATA("This is the CDATA content of the element");
Element childElement = rootElement.addElement("childElement").addAttribute("attributeName", "attributeValue");