// Add some children of various types
factory.createOMText(element, "some text");
factory.createOMText(element, "cdata section", OMNode.CDATA_SECTION_NODE);
factory.createOMComment(element, "comment");
factory.createOMProcessingInstruction(element, "piTarget", "piData");
factory.createOMElement("child", null, element);
QName qname = new QName("urn:ns1", "test", "ns");
element.setText(qname);
assertEquals("ns:test", element.getText());