code: protected Element appendElementWithAttributes(Document doc, Element parent,
  			String elName, String... attrList) {
  
  		if (attrList.length % 2 != 0) {
  			throw new RuntimeException("Bad attrList length");
  		}
  
  		Element el = createAndAppendElement(doc, parent, elName);
  
  		for (int i = 0; i < attrList.length; i += 2) {
  			el.setAttributeNS(null, attrList[i], attrList[i + 1]);
  		}
  
  		return el;
  	}
docs: Helper to create an {@link Element} without a namespace in {@link Document} doc and append it to the
  {@link Element} given by
  parent. Further, add all attributes to the newly created {@link Element} specified by attrList.
  
  @param doc
  the target {@link Document}
  @param parent
  the parent {@link Element}
  @param elName
  the name of the new {@link Element}
  @param attrList
  name value pairs of attributes
  @return the new {@link Element}