Here you can find the source of createElement(Document dom, String elementName, Properties attributes)
public static Element createElement(Document dom, String elementName, Properties attributes)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.util.Enumeration; import java.util.Properties; import org.w3c.dom.Document; import org.w3c.dom.Element; public class Main { public static Element createElement(Document dom, String elementName, Properties attributes) { // make sure to create element with any namespace uri to enable finding // it again using Dom.getElementsByTagNameNS() Element element = dom.createElementNS("", elementName); //$NON-NLS-1$ if (attributes != null) { Enumeration e = attributes.keys(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); element.setAttribute(key, attributes.getProperty(key)); }// ww w . j a va 2s . co m } return element; } }