/**
   * call when a new element is started
   *
   * @param node the node to push
   */
  protected void onCreateElement(XmlNode node) {
    String prefix;
    for (String newUri : mNewNamespaces) {
      prefix = mNamespaceURIs.get(newUri);
      node.getContent().addAttribute(XmlValidator.XML_NS, prefix, newUri);
    }
    mNewNamespaces.clear();

    onCreateNode(node);

    mStack.push(node);
  }
  /** @param node the create node (must node be an element node ! ) */
  protected void onCreateNode(XmlNode node) {
    mStack.peek().addChildNode(node);

    sLastNode = node.toString().trim();
  }
 /** Creates the root document */
 protected void createRootDocument() {
   XmlNode doc = XmlNode.createDocument();
   mStack.push(doc);
   mRoot = doc;
 }