Java XML Element Create createTable(Element theParent)

Here you can find the source of createTable(Element theParent)

Description

create Table

License

Open Source License

Declaration

public static Element createTable(Element theParent) 

Method Source Code

//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;
    }
}

Related

  1. createElementWithText(Element parent, String name, String value)
  2. createElmWithText(Document doc, String tagName, String text)
  3. createNewElementAndSetAndAttribute(Document document, Element parent, String childElement, String childValue, String attributeName, String attributeValue)
  4. createNode(Document doc, Element parent, String nodeName, Object[] attr)
  5. createNode(Document doc, Element parent, String nodeName, Object[] attr)
  6. createText(final Node parent, final String text)
  7. createText(Node parent, String tag, String text)
  8. createText(String sValue, Node nParent)
  9. createTextElement(Element parent, String tagName, String text)