Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-70

An XML document parsed with the Forge XMLParser cannot be exported with XMLParser#toXML if it contains comments

    XMLWordPrintable

Details

    Description

      When the XMLParser#parse method is called on a stream which contains comments, DOM creates a Node named "#comment" and the corresponding Node is created by Forge parser. After that, when the XMLParser#toXML method is called on the XML root node an exception is thrown.

      At serialization Forge parser tries to create a Node with name "#comment" by using the method Document#createElement (which is illegal and result in a DOMException#INVALID_CHARACTER_ERR) instead of calling the method Document#createComment. IMO, the same problem could happen with others specific nodes.

      Maybe Shrinkwrap descriptor project could have the same problem, but it needs further investigations...

      Attachments

        Activity

          People

            kevinpollet Kévin Pollet (Inactive)
            kevinpollet Kévin Pollet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: