Example #1
0
 /**
  * @webref xml:method
  * @brief Appends a new child to the element
  */
 public XML addChild(String tag) {
   Document document = node.getOwnerDocument();
   Node newChild = document.createElement(tag);
   return appendChild(newChild);
 }
Example #2
0
 public XML addChild(XML child) {
   Document document = node.getOwnerDocument();
   Node newChild = document.importNode((Node) child.getNative(), true);
   return appendChild(newChild);
 }
Example #3
0
 /**
  * @webref xml:method
  * @brief Sets the element's name
  */
 public void setName(String newName) {
   Document document = node.getOwnerDocument();
   node = document.renameNode(node, null, newName);
   //    name = node.getNodeName();
 }