1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

Make Bookmarks.toXML() return valid XML again

Fixes SMACK-594
This commit is contained in:
Florian Schmaus 2014-08-14 22:25:52 +02:00
parent 3c88c2f705
commit 450015bf40

View file

@ -169,13 +169,13 @@ public class Bookmarks implements PrivateData {
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder buf = new XmlStringBuilder();
buf.openElement(ELEMENT).xmlnsAttribute(NAMESPACE);
buf.halfOpenElement(ELEMENT).xmlnsAttribute(NAMESPACE).rightAngelBracket();
for (BookmarkedURL urlStorage : getBookmarkedURLS()) {
if(urlStorage.isShared()) {
continue;
}
buf.openElement("url").attribute("name", urlStorage.getName()).attribute("url", urlStorage.getURL());
buf.halfOpenElement("url").attribute("name", urlStorage.getName()).attribute("url", urlStorage.getURL());
buf.condAttribute(urlStorage.isRss(), "rss", "true");
buf.closeEmptyElement();
}
@ -185,7 +185,7 @@ public class Bookmarks implements PrivateData {
if(conference.isShared()) {
continue;
}
buf.openElement("conference");
buf.halfOpenElement("conference");
buf.attribute("name", conference.getName());
buf.attribute("autojoin", Boolean.toString(conference.isAutoJoin()));
buf.attribute("jid", conference.getJid());