1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 05:51:08 +01:00

Change Element.toXml() to toXml(String enclosingNamespace)

This commit is contained in:
Florian Schmaus 2018-04-25 14:20:18 +02:00
parent 380f9a2b72
commit 5ab2903c32
229 changed files with 634 additions and 536 deletions

View file

@ -137,7 +137,7 @@ public class DataPacketExtension implements ExtensionElement {
}
@Override
public XmlStringBuilder toXML() {
public XmlStringBuilder toXML(String enclosingNamespace) {
XmlStringBuilder xml = getIQChildElementBuilder(new IQChildElementXmlStringBuilder(this));
xml.closeElement(this);
return xml;

View file

@ -232,11 +232,11 @@ public class Bytestream extends IQ {
xml.rightAngleBracket();
if (getToActivate() == null) {
for (StreamHost streamHost : getStreamHosts()) {
xml.append(streamHost.toXML());
xml.append(streamHost.toXML(null));
}
}
else {
xml.append(getToActivate().toXML());
xml.append(getToActivate().toXML(null));
}
break;
case result:
@ -246,7 +246,7 @@ public class Bytestream extends IQ {
// constructions mechanisms of Bytestream
// A result from the server can also contain stream hosts
for (StreamHost host : streamHosts) {
xml.append(host.toXML());
xml.append(host.toXML(null));
}
break;
case get:
@ -325,7 +325,7 @@ public class Bytestream extends IQ {
}
@Override
public XmlStringBuilder toXML() {
public XmlStringBuilder toXML(String enclosingNamespace) {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute("jid", getJID());
xml.attribute("host", getAddress());
@ -375,7 +375,7 @@ public class Bytestream extends IQ {
}
@Override
public XmlStringBuilder toXML() {
public XmlStringBuilder toXML(String enclosingNamespace) {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute("jid", getJID());
xml.closeEmptyElement();
@ -418,7 +418,7 @@ public class Bytestream extends IQ {
}
@Override
public XmlStringBuilder toXML() {
public XmlStringBuilder toXML(String enclosingNamespace) {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
xml.escape(getTarget());