示例#1
0
 public Node getChildRecursive(String type, String value) {
   for (Node child : getChildrenByType(type)) {
     if (value.equals(child.getValue())) return child;
   }
   for (Node child : getChildren()) {
     Node ret = child.getChildRecursive(type, value);
     if (ret != null) return ret;
   }
   return null;
 }
示例#2
0
 public Node getChild(String type, String value) {
   for (Node child : getChildrenByType(type)) {
     if (value.equals(child.getValue())) return child;
   }
   return null;
 }
示例#3
0
 public String getChildValueByType(String type) {
   Node child = getChildByType(type);
   return child == null ? null : child.getValue();
 }