Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] <receive/> vs. <receive />

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] <receive/> vs. <receive />
  • Date: Thu, 10 Nov 2005 18:50:28 -0800

Just curious, what's the rationale for Document.toXML() and the Serializer outputting empty elements in a different way, with and without a blank?Example: <receive/> vs. <receive />
Shouldn't both routes output the same style?

The relevant part is Element.toXML()

...
if (element.getChildCount() > 0) {
result.append('>');
}
else {
result.append(" />");
}

It's a special casing is not done by the Serializer.

Wolfgang.




Archive powered by MHonArc 2.6.24.

Top of Page