/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<Object>(); for (Object o : out) { if (o instanceof Tag && ((Tag) o).getName().equals(tag)) out.add(o); } return out; }
/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<>(); for (Object o : content) { if (o instanceof Tag && ((Tag) o).getName() .equals(tag)) out.add(o); } return out; }
/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<Object>(); for (Object o : out) { if (o instanceof Tag && ((Tag) o).getName().equals(tag)) out.add(o); } return out; }
/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<Object>(); for (Object o : out) { if (o instanceof Tag && ((Tag) o).getName().equals(tag)) out.add(o); } return out; }
/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<Object>(); for (Object o : out) { if (o instanceof Tag && ((Tag) o).getName().equals(tag)) out.add(o); } return out; }
/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<>(); for (Object o : content) { if (o instanceof Tag && ((Tag) o).getName() .equals(tag)) out.add(o); } return out; }
/** * Return only the tags of the first level of descendants that match the * name. */ public List<Object> getContents(String tag) { List<Object> out = new ArrayList<>(); for (Object o : content) { if (o instanceof Tag && ((Tag) o).getName() .equals(tag)) out.add(o); } return out; }
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } String suri = sn == null ? mapping.getAttribute("xmlns") : mapping.getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child.findRecursiveAttribute("xmlns:" + tn); return ((turi == null) && (suri == null)) || ((turi != null) && turi.equals(suri)); }
if (o instanceof Tag) { Tag child = (Tag) o; if (child.getName() .equals(elementName) || elementName.equals("*")) child.select(remainder, results, mapping);
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } String suri = sn == null ? mapping.getAttribute("xmlns") : mapping.getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child.findRecursiveAttribute("xmlns:" + tn); return ((turi == null) && (suri == null)) || ((turi != null) && turi.equals(suri)); }
if (o instanceof Tag) { Tag child = (Tag) o; if (child.getName().equals(elementName) || elementName.equals("*")) child.select(remainder, results, mapping);
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } String suri = sn == null ? mapping.getAttribute("xmlns") : mapping.getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child.findRecursiveAttribute("xmlns:" + tn); return ((turi == null) && (suri == null)) || ((turi != null) && turi.equals(suri)); }
if (o instanceof Tag) { Tag child = (Tag) o; if (child.getName().equals(elementName) || elementName.equals("*")) child.select(remainder, results, mapping);
if (o instanceof Tag) { Tag child = (Tag) o; if (child.getName().equals(elementName) || elementName.equals("*")) child.select(remainder, results, mapping);
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } String suri = sn == null ? mapping.getAttribute("xmlns") : mapping.getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child.findRecursiveAttribute("xmlns:" + tn); return ((turi == null) && (suri == null)) || ((turi != null) && turi.equals(suri)); }
if (o instanceof Tag) { Tag child = (Tag) o; if (child.getName() .equals(elementName) || elementName.equals("*")) child.select(remainder, results, mapping);
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } else { String suri = sn == null ? mapping.getAttribute("xmlns") : mapping .getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child .findRecursiveAttribute("xmlns:" + tn); return turi == suri || (turi != null && suri != null && turi.equals(suri)); } }
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } String suri = sn == null ? mapping.getAttribute("xmlns") : mapping.getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child.findRecursiveAttribute("xmlns:" + tn); return ((turi == null) && (suri == null)) || ((turi != null) && turi.equals(suri)); }
if (o instanceof Tag) { Tag child = (Tag) o; if (child.getName().equals(elementName) || elementName.equals("*")) child.select(remainder, results, mapping);
public boolean match(String search, Tag child, Tag mapping) { String target = child.getName(); String sn = null; String tn = null; if (search.equals("*")) return true; int s = search.indexOf(':'); if (s > 0) { sn = search.substring(0, s); search = search.substring(s + 1); } int t = target.indexOf(':'); if (t > 0) { tn = target.substring(0, t); target = target.substring(t + 1); } if (!search.equals(target)) // different tag names return false; if (mapping == null) { return tn == sn || (sn != null && sn.equals(tn)); } String suri = sn == null ? mapping.getAttribute("xmlns") : mapping.getAttribute("xmlns:" + sn); String turi = tn == null ? child.findRecursiveAttribute("xmlns") : child.findRecursiveAttribute("xmlns:" + tn); return ((turi == null) && (suri == null)) || ((turi != null) && turi.equals(suri)); }