private void createElement(String name, Attributes attributes) {
		Element element = document.createElement(name);
		for (int i = 0; i < attributes.getLength(); i++) {
			String attrName = attributes.getLocalName(i);
			if (attrName == null || "".equals(attrName)) {
				attrName = attributes.getQName(i);
			}
			if (attrName != null || !"".equals(attrName)) {
				element.setAttribute(attrName, attributes.getValue(i));
			}
		}
		if (currentNode != null) {
			currentNode.appendChild(element);
		} else {
			root = element;
			document.appendChild(element);
		}
		currentNode = element;
	}