Here you can find the source of createTable(Element theParent)
public static Element createTable(Element theParent)
//package com.java2s; import org.w3c.dom.Element; public class Main { public static Element createTable(Element theParent) { Element aElem = theParent.getOwnerDocument().createElement("table"); aElem.setAttribute("border", "0"); aElem.setAttribute("cellspacing", "0"); aElem.setAttribute("cellpadding", "0"); theParent.appendChild(aElem);/*from ww w .j a v a 2s . co m*/ return aElem; } }