aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/xml/Element.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 15:07:20 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 15:07:20 +0100
commit53d9c9997a508985f0e19aba928bfa25c80ba23e (patch)
tree5e79bfe04db8d51091bcf9b94baa979217e9d542 /src/de/gultsch/chat/xml/Element.java
parent43531113b798cda6b2f76257641f38b0af986437 (diff)
more cleanup. more listeners
Diffstat (limited to '')
-rw-r--r--src/de/gultsch/chat/xml/Element.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/de/gultsch/chat/xml/Element.java b/src/de/gultsch/chat/xml/Element.java
index af3d8f1f..24e65649 100644
--- a/src/de/gultsch/chat/xml/Element.java
+++ b/src/de/gultsch/chat/xml/Element.java
@@ -28,6 +28,15 @@ public class Element {
return this;
}
+ public Element findChild(String name) {
+ for(Element child : this.children) {
+ if (child.getName().equals(name)) {
+ return child;
+ }
+ }
+ return null;
+ }
+
public boolean hasChild(String name) {
for(Element child : this.children) {
if (child.getName().equals(name)) {
@@ -37,6 +46,10 @@ public class Element {
return false;
}
+ public String getContent() {
+ return content;
+ }
+
public Element setAttribute(String name, String value) {
this.attributes.put(name, value);
return this;