List of utility methods to do XML Text Node Create
void | addText(Document doc, Node node, String text) Add a text node to a node. node.appendChild(doc.createTextNode(text)); |
void | addText(Document doc, Node parent, String data) add Text parent.appendChild(doc.createTextNode(data)); |
Element | addTextElement(Document doc, String name, String value, Element parent) add Text Element Element child = doc.createElement(name);
child.appendChild(doc.createTextNode(value));
parent.appendChild(child);
return child;
|
void | addTextElement(Document document, Node parentNode, String elementName, String elementText) Convenience method for adding an XML text element. Element textElement = document.createElement(elementName); textElement.appendChild(document.createTextNode(elementText)); parentNode.appendChild(textElement); |
Element | addTextElement(final Document document, final Element parentDom, final String namespace, final String name, final String value) This method creates and adds a new XML Element with text value final Element dom = document.createElementNS(namespace, name); parentDom.appendChild(dom); final Text valueNode = document.createTextNode(value); dom.appendChild(valueNode); return dom; |
Element | addTextElement(final Document document, final Element parentDom, final String namespace, final String name, final String value) This method creates and adds a new XML Element with text value final Element dom = document.createElementNS(namespace, name); parentDom.appendChild(dom); final Text valueNode = document.createTextNode(value); dom.appendChild(valueNode); return dom; |
void | addTextNode(Document document, Element ret, String tag, String value) Adds a TextNode to a given Element in a DOM Element typeElement = document.createElement(tag); Text typeText = document.createTextNode(value); typeElement.appendChild(typeText); ret.appendChild(typeElement); |
void | addTextNode(Document XMLDocument, Node rootElement, String tagName, String text) Adds a simple DOM Node like Element newNode = XMLDocument.createElement(tagName); newNode.appendChild(XMLDocument.createTextNode(text)); rootElement.appendChild(newNode); |
Element | appendElementChild(Document doc, Element parent, String name) append Element Child Element el = doc.createElement(name);
parent.appendChild(el);
return el;
|
Element | appendElementChildWithText(Document doc, Element parent, String name, String text) append Element Child With Text Element el = appendElementChild(doc, parent, name);
el.setTextContent(text);
return el;
|