@Override public void openElement(String tagName){
  Element newElement=document.createElement(tagName);
  current.appendChild(newElement);
  current=newElement;
}

@ Override public void openElement ( String tagName ) { Element newElement = document . createElement ( tagName ) ; current . appendChild ( newElement ) ; current = newElement ; }
puts a new element into the dom document . the new element is added as a child to the current element in the dom document . then it becomes the current element . the element must be closed using closeelement .
