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
1 changed files with 11 additions and 1 deletions

View File

@ -112,7 +112,17 @@ public class DefaultPacketExtension implements PacketExtension {
}
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();
}
/**