Element parent2 = factory.element("parent2");
parent2.setAttribute("attr1", "value1");
parent2.setAttribute("attr2", "value2");
parent2.setAttribute("attr3", "value3");
parent2.setAttribute("attr4", "value4");
Element child2a = factory.element("child2a");
Element child2b = factory.element("child2b");
parent2.addContent(child2a);
parent2.addContent(child2b);