Beispiel #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;
 }
Beispiel #2
0
 public Node getChild(String type, String value) {
   for (Node child : getChildrenByType(type)) {
     if (value.equals(child.getValue())) return child;
   }
   return null;
 }
Beispiel #3
0
 public String getChildValueByType(String type) {
   Node child = getChildByType(type);
   return child == null ? null : child.getValue();
 }