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