Java Utililty Methods XML Element Child Append

List of utility methods to do XML Element Child Append

Description

The list of methods to do XML Element Child Append are organized into topic(s).

Method

voidappendNewComment(Element parentElement, String commentText)
append New Comment
Comment commentNode = parentElement.getOwnerDocument().createComment(commentText);
parentElement.appendChild(commentNode);
ElementappendNewElement(Document document, Element parent, Enum el)
append New Element
return appendNewElement(document, parent, el.toString());
ElementappendNewElement(Document document, Element parent, String element, Object content, String namespace)
append New Element
Element childElement;
if (namespace != null) {
    childElement = document.createElementNS(namespace, element);
} else {
    childElement = document.createElement(element);
if (content != null) {
    childElement.appendChild(document.createTextNode(content.toString()));
...
ElementappendNewElement(Node parent, String elementName)
append New Element
Element elementNode = parent.getOwnerDocument().createElement(elementName);
parent.appendChild(elementNode);
return elementNode;
ElementappendNewElementIfNotNull(Document document, Element parent, Enum el, Object content, String namespace)
append New Element If Not Null
return appendNewElementIfNotNull(document, parent, el.toString(), content, namespace);
ElementappendNewElementIfNotNull(Document document, Element parent, Enum el, Object content, String namespace)
append New Element If Not Null
return appendNewElementIfNotNull(document, parent, el.toString(), content, namespace);
voidappendNode(Node node, StringBuilder sb, int indent)
append Node
for (int i = 0; i < indent; i++) {
    sb.append(INDENT_STRING);
sb.append("Node Type: ");
sb.append(node.getNodeType());
sb.append(", Node Name: ");
sb.append(node.getNodeName());
sb.append(", Node Value: '");
...