further bullet proofing

This commit is contained in:
iNPUTmice 2014-06-13 11:16:52 +02:00
parent a92fb88e51
commit 899da61555

View File

@ -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;
}