Android XML Document Append createXmlElement(Document xml, Element parent, String name)

Here you can find the source of createXmlElement(Document xml, Element parent, String name)

Description

create Xml Element

Declaration

public static final Element createXmlElement(Document xml,
            Element parent, String name) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class Main {
    public static final Element createXmlElement(Document xml,
            Element parent, String name) {
        Element e = xml.createElement(name);
        try {//  w w w . ja v a 2  s. c  o m
            parent.appendChild(e);
        } catch (Exception ex) {
            System.out.println(ex.toString());
        }
        return e;
    }
}

Related

  1. buildPlayerNode(Document doc, String user, String addy, double lat, double lng)
  2. createAttribute(Document document, String name, String value)
  3. createElementWithCDATASection(Document document, String name, String value)
  4. createElementWithTextNode(Document document, String name, String value)
  5. createNode(Document d, String nameSpace, String name)