private Element createElement(String element, String attribute, String attValue, String value) {
        Element elem = xmlCreate.createElement(element);
        if (!attribute.equals("")) {
            Attr attr = xmlCreate.createAttribute(attribute);
            attr.setValue(attValue);
            elem.setAttributeNode(attr);
        }
        if (!value.equals("")) {
            elem.appendChild(xmlCreate.createTextNode(value));
        }
        return elem;
    }