List of utility methods to do XML Child Element Add
Element | addElement(Element parent, Element childElement) add Element Node childNode = parent.getOwnerDocument().importNode(childElement, true);
parent.appendChild(childNode);
return parent;
|
Element | addElementChildTo(Element parent, String nsURI, String qualifiedName) Adds an Element child to the given element. final Document doc = parent.getOwnerDocument(); final Element child = doc.createElementNS(nsURI, qualifiedName); parent.appendChild(child); return child; |
void | appendElement(Element parent, Element child) Appends another element as a child element. Node tmp = parent.getOwnerDocument().importNode(child, true); parent.appendChild(tmp); |
void | appendElement(Element parent, Element child) append Element Node tmp = parent.getOwnerDocument().importNode(child, true); parent.appendChild(tmp); |
Node | appendTextNode(Node parent, String child) append Text Node if (parent == null) System.err.println("parent null 0"); if (parent instanceof Document) parent = ((Document) parent).getDocumentElement(); if (parent == null) System.err.println("parent null 1"); if (parent.getOwnerDocument() == null) System.err.println("parent ownerdoc null"); ... |