1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 22:32:06 +01:00

Write out XML correctly.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1930 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-05-08 16:24:08 +00:00 committed by mtucker
parent 1fce8b422b
commit 37b7268abf

View file

@ -112,7 +112,17 @@ public class DefaultPacketExtension implements PacketExtension {
} }
public String toXML() { public String toXML() {
return null; StringBuffer buf = new StringBuffer();
buf.append("<").append(elementName).append(" xmlns=\"").append(namespace).append("\">");
for (Iterator i=getNames(); i.hasNext(); ) {
String name = (String)i.next();
String value = getValue(name);
buf.append("<").append(name).append(">");
buf.append(value);
buf.append("</").append(name).append(">");
}
buf.append("</").append(elementName).append(">");
return buf.toString();
} }
/** /**