List of utility methods to do XML Element Set
void | setProperty(Element element, BeanDefinitionBuilder bean, String name) Sets a property using XML element and name of property. setProperty(element, bean, name, String.class);
|
void | setText(Element e, String text) Set the text of the specified element to the given string. NodeList lst = e.getChildNodes(); int size = lst.getLength(); for (int i = 0; i < size; i++) { Node n = lst.item(i); if (n.getNodeType() == Node.TEXT_NODE) { Text t = (Text) n; t.setData(text.trim()); return; ... |
void | setText(Element elem, String value) set Text Document doc = elem.getOwnerDocument(); Text text = doc.createTextNode(value); elem.appendChild(text); |
void | setText(Element element, String data) set Text element.appendChild(element.getOwnerDocument().createTextNode(data != null ? data : ""));
|
void | setText(Element element, String text) set Text if (text == null || "".equals(text)) { return; Text txt = element.getOwnerDocument().createTextNode(text); element.appendChild(txt); |
void | setText(Element element, String text) Create a new text node and add it as child to the given element. if (text == null || "".equals(text)) { return; Text txt = element.getOwnerDocument().createTextNode(text); element.appendChild(txt); |
void | setText(Element element, String text) Set or remove text for an element. element.setTextContent(text); |
void | setTextContent(Element elem, String content) set Text Content Document doc = elem.getOwnerDocument(); if ((content != null) && !content.equals("")) { Text textNode = doc.createTextNode(content); elem.appendChild(textNode); |
void | setTextContent(Element elem, String value) set Text Content if (value == null) value = ""; Text textNode = (Text) elem.getFirstChild(); if (textNode == null) { if (!value.equals("")) { textNode = elem.getOwnerDocument().createTextNode(value); elem.appendChild(textNode); } else if (value.equals("")) elem.removeChild(textNode); else textNode.setData(value); |
void | setTextContent(Element element, String content) set Text Content if (content != null && content.length() > 0) {
element.appendChild(element.getOwnerDocument().createTextNode(content));
|