add Properties Node to XML Element - Java XML

Java examples for XML:DOM Node

Description

add Properties Node to XML Element

Demo Code


//package com.java2s;

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

public class Main {
    public static final String PROPERTIES_NODE = "properties";

    public static Element addPropertiesNode(Document document,
            Element parent) {/*from   ww w  .  j a v a 2  s .c  o m*/
        Element element = document.createElement(PROPERTIES_NODE);
        parent.appendChild(element);
        return element;
    }
}

Related Tutorials