mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
further bullet proofing
This commit is contained in:
parent
a92fb88e51
commit
899da61555
@ -52,7 +52,8 @@ public class Element {
|
||||
|
||||
public Element findChild(String name, String xmlns) {
|
||||
for (Element child : this.children) {
|
||||
if (child.getName().equals(name)&&(child.getAttribute("xmlns").equals(xmlns))) {
|
||||
if (child.getName().equals(name)
|
||||
&& (child.getAttribute("xmlns").equals(xmlns))) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
@ -67,8 +68,6 @@ public class Element {
|
||||
return findChild(name, xmlns) != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<Element> getChildren() {
|
||||
return this.children;
|
||||
}
|
||||
@ -83,7 +82,9 @@ public class Element {
|
||||
}
|
||||
|
||||
public Element setAttribute(String name, String value) {
|
||||
if (name != null && value != null) {
|
||||
this.attributes.put(name, value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user