Java examples for XML:DOM Node
set Text Content to XML Node
//package com.java2s; import org.w3c.dom.*; public class Main { public static Document d; public static void setTextContent(Node n, String s) { n.appendChild(d.createTextNode(s)); }//from ww w .j a v a 2 s . c om }