mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-15 15:31:08 +01:00
Change Element.toXml() to toXml(String enclosingNamespace)
This commit is contained in:
parent
380f9a2b72
commit
5ab2903c32
229 changed files with 634 additions and 536 deletions
|
|
@ -400,7 +400,7 @@ public class FormField implements NamedElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public XmlStringBuilder toXML() {
|
||||
public XmlStringBuilder toXML(String enclosingNamespace) {
|
||||
XmlStringBuilder buf = new XmlStringBuilder(this);
|
||||
// Add attributes
|
||||
buf.optAttribute("label", getLabel());
|
||||
|
|
@ -416,7 +416,7 @@ public class FormField implements NamedElement {
|
|||
}
|
||||
// Loop through all the values and append them to the string buffer
|
||||
for (Option option : getOptions()) {
|
||||
buf.append(option.toXML());
|
||||
buf.append(option.toXML(null));
|
||||
}
|
||||
buf.optElement(validateElement);
|
||||
buf.closeElement(this);
|
||||
|
|
@ -434,12 +434,12 @@ public class FormField implements NamedElement {
|
|||
|
||||
FormField other = (FormField) obj;
|
||||
|
||||
return toXML().equals(other.toXML());
|
||||
return toXML(null).equals(other.toXML(null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toXML().hashCode();
|
||||
return toXML(null).hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -492,7 +492,7 @@ public class FormField implements NamedElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public XmlStringBuilder toXML() {
|
||||
public XmlStringBuilder toXML(String enclosingNamespace) {
|
||||
XmlStringBuilder xml = new XmlStringBuilder(this);
|
||||
// Add attribute
|
||||
xml.optAttribute("label", getLabel());
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ public class DataForm implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public XmlStringBuilder toXML() {
|
||||
public XmlStringBuilder toXML(String enclosingNamespace) {
|
||||
XmlStringBuilder buf = new XmlStringBuilder(this);
|
||||
buf.attribute("type", getType());
|
||||
buf.rightAngleBracket();
|
||||
|
|
@ -310,10 +310,10 @@ public class DataForm implements ExtensionElement {
|
|||
}
|
||||
// Loop through all the form fields and append them to the string buffer
|
||||
for (FormField field : getFields()) {
|
||||
buf.append(field.toXML());
|
||||
buf.append(field.toXML(null));
|
||||
}
|
||||
for (Element element : extensionElements) {
|
||||
buf.append(element.toXML());
|
||||
buf.append(element.toXML(null));
|
||||
}
|
||||
buf.closeElement(this);
|
||||
return buf;
|
||||
|
|
@ -358,7 +358,7 @@ public class DataForm implements ExtensionElement {
|
|||
buf.openElement(ELEMENT);
|
||||
// Loop through all the form items and append them to the string buffer
|
||||
for (FormField field : getFields()) {
|
||||
buf.append(field.toXML());
|
||||
buf.append(field.toXML(null));
|
||||
}
|
||||
buf.closeElement(ELEMENT);
|
||||
return buf;
|
||||
|
|
@ -394,7 +394,7 @@ public class DataForm implements ExtensionElement {
|
|||
buf.openElement(ELEMENT);
|
||||
// Loop through all the form items and append them to the string buffer
|
||||
for (FormField field : getFields()) {
|
||||
buf.append(field.toXML());
|
||||
buf.append(field.toXML(null));
|
||||
}
|
||||
buf.closeElement(ELEMENT);
|
||||
return buf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue