Here you can find the source of createElementNsIn(Element parent, String ns, String name, String textContent)
public static Element createElementNsIn(Element parent, String ns, String name, String textContent)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { public static Element createElementNsIn(Element parent, String ns, String name, String textContent) { Element el = parent.getOwnerDocument().createElementNS(ns, name); parent.appendChild(el);/*from ww w. j av a 2 s . co m*/ el.setTextContent(textContent); return el; } public static Element createElementNsIn(Element parent, String ns, String name) { Element el = parent.getOwnerDocument().createElementNS(ns, name); parent.appendChild(el); return el; } }