Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.0 M1
-
None
-
regression
-
Unit
-
Trivial
-
Description
For example com.xpn.xwiki.doc.XWikiAttachment.toXML(boolean, boolean, XWikiContext) returns an empty <attachment/> Element.
This is caused by a bug inside com.xpn.xwiki.internal.xml.DOMXMLWriter.write(Element) and com.xpn.xwiki.internal.xml.DOMXMLWriter.writeOpen(Element) which actually have their behaviors reversed. Thus, instead of writing the start tag of the container <attachment> element, the whole DOM document is written, and everything else is ignored.