Java XML Duration Add addText(Node parent, String value)

Here you can find the source of addText(Node parent, String value)

Description

add Text

License

Open Source License

Declaration

public static Node addText(Node parent, String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Node;
import org.w3c.dom.Text;

public class Main {
    public static Node addText(Node parent, String value) {
        Text text = parent.getOwnerDocument().createTextNode(value);
        parent.appendChild(text);/*from w w  w.  jav  a2s . c  o m*/
        return text;
    }
}

Related

  1. addElementFirst(final Element parent, final String name)
  2. addLongElementNS(Element parent, String namespaceURI, String tag, long value)
  3. addNamespacePrefix(Element parent, String namespace, String basePrefix)
  4. addNode(Element parent, String elementName, String namespaceURI)
  5. addNode(Node parentNode, String name)
  6. addTextElement(Node parent, String name, String value)
  7. appendElement(Element parent, String tagName)
  8. appendElement(Element parent, String tagName, String value)
  9. appendElement(Element parent, String type)