Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5937

XML export methods returning an Element don't work anymore

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0 M1
    • Fix Version/s: 3.0 M2, 2.7.1
    • Component/s: {Unused} Core
    • Labels:
      None
    • keywords:
      regression
    • Tests:
      Unit
    • Difficulty:
      Trivial
    • Similar issues:

      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.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              sdumitriu Sergiu Dumitriu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: