public void startElement(final @NonNls String elementName, final String namespace){
    if (!myElementNames.isEmpty()) {
      if(!myElementHasBody.peek()){
        myBuffer.append(">\n");
      }
      myElementHasBody.pop();
      myElementHasBody.push(true);
    }

    writeSpaces(myElementNames.size()*INDENT);
    myBuffer.append("<").append(elementName);

    if (namespace != null) {
      myBuffer.append(" xmlns=\"").append(namespace).append('"');
    }

    myElementNames.push(elementName);
    myElementHasBody.push(false);
  }
public void startElement(final @NonNls String elementName, final String namespace)