Example #1
0
 public XMLHelper createSubNode(String subnode) {
   int pos = subnode.lastIndexOf(DELIM);
   if (pos >= 0) {
     XMLHelper helper = getSubNode(subnode.substring(0, pos));
     return helper.createSubNode(subnode.substring(pos + 1));
   } else {
     return new XMLHelper(
         (Element) element.appendChild(element.getOwnerDocument().createElement(subnode)), true);
   }
 }
Example #2
0
 public XMLHelper getSubNodeByName(String subnode, String name, String namenode) {
   XMLHelper[] list = getSubNodeList(subnode);
   if (list.length != 0) {
     for (int i = 0; i < list.length; i++) {
       if (list[i].getSubNode(namenode).getValue().compareTo(name) == 0) {
         return list[i];
       }
     }
   }
   XMLHelper node = createSubNode(subnode);
   node.createSubNode(namenode).setValue(name);
   return node;
 }