Пример #1
0
  /**
   * 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);
  }
Пример #2
0
  /** @param node the create node (must node be an element node ! ) */
  protected void onCreateNode(XmlNode node) {
    mStack.peek().addChildNode(node);

    sLastNode = node.toString().trim();
  }
Пример #3
0
 /** Creates the root document */
 protected void createRootDocument() {
   XmlNode doc = XmlNode.createDocument();
   mStack.push(doc);
   mRoot = doc;
 }