public void writeElement(final Element element){
    startElement(element.getName());
    try {
      for (final Attribute attribute : element.getAttributes()) {
        addAttribute(attribute.getName(), attribute.getValue());
      }
      for (final Element child : element.getChildren()) {
        writeElement(child);
      }
    }
    finally {
      endElement();
    }
  }
public void writeElement(final Element element)