List of utility methods to do XML Child Element Create
void | addChildText(Document doc, Element parent, String textValue) This method is used to create a Child Text node directly after the last child of an existing element. parent.appendChild(doc.createTextNode(textValue)); |
Element | addElement(Document doc, Element parent, String nodeName) add Element Element el = null; if (doc != null) el = doc.createElement(nodeName); if (parent != null) parent.appendChild(el); return el; |
void | addElement(Document doc, Element rootElement, String elementName, String typeIn, String isArrayIn, String partitionerIn) Helper method to add elements to the test data schema Element element = doc.createElement("element"); rootElement.appendChild(element); Element name = doc.createElement("name"); name.appendChild(doc.createTextNode(elementName)); element.appendChild(name); Element type = doc.createElement("type"); type.appendChild(doc.createTextNode(typeIn)); element.appendChild(type); ... |
Element | addElement(Document doc, Node parent, String element) add Element return addElement(doc, parent, element, null);
|
Element | addElement(Document doc, String name, Element parent) add Element Element ee = doc.createElement(name);
parent.appendChild(ee);
return ee;
|
void | addElement(Document document, Element father, String name, String attOneName, String attOneValue, String attTwoName, String attTwoValue) adds an Element with two attributs to a DOM-tree. Element element = document.createElement(name); element.setAttribute(attOneName, attOneValue); element.setAttribute(attTwoName, attTwoValue); father.appendChild(element); |
Element | addElement(Document document, Element parentElement, String elementName, String elementValue) add Element Element childElement = addElement(document, parentElement, elementName);
childElement.setTextContent(elementValue);
return childElement;
|
Element | addElement(final Document doc, final Node parent, final String name) Adds an element to the specified document. Element element = doc.createElement(name); if (parent != null) { parent.appendChild(element); } else { doc.appendChild(element); return element; |
Element | addElement(final Document document, final Element parentDom, final String namespace, final String name) This method creates and adds a new XML Element final Element dom = document.createElementNS(namespace, name); parentDom.appendChild(dom); return dom; |
Element | addElement(final Document document, final Element parentDom, final String namespace, final String name) This method creates and adds a new XML Element final Element dom = document.createElementNS(namespace, name); parentDom.appendChild(dom); return dom; |