diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-20 15:49:53 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-20 15:49:53 +0100 |
commit | b6ea028a9d2ceed5da7aa15e68c56cfd91291e94 (patch) | |
tree | 263b3c42057771944ab7c24096858c394460c499 /src/eu/siacs/conversations/xml/Element.java | |
parent | 5653880156eac4da93bda9dbfef6df129a207b09 (diff) |
added no-copy
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/xml/Element.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/xml/Element.java b/src/eu/siacs/conversations/xml/Element.java index 6cf6d3a5..91d9ed6b 100644 --- a/src/eu/siacs/conversations/xml/Element.java +++ b/src/eu/siacs/conversations/xml/Element.java @@ -17,7 +17,22 @@ public class Element { public Element addChild(Element child) { this.content = null; children.add(child); - return this; + return child; + } + + public Element addChild(String name) { + this.content = null; + Element child = new Element(name); + children.add(child); + return child; + } + + public Element addChild(String name, String xmlns) { + this.content = null; + Element child = new Element(name); + child.setAttribute("xmlns", xmlns); + children.add(child); + return child; } public Element setContent(String content) { |