Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-139656

QDomDocument gains phantom nodes when parsed with PreserveSpacingOnlyNodes option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.9.2
    • XML: DOM
    • None
    • Windows

      When an QDomDocument is parsed with the 'PreserveSpacingOnlyNodes' option, it gains phantom text nodes that consist of a newline followed by the number of spaces of indentation.

      To reproduce this problem, compile and execute attached code.

      If you use the 'PreserveSpacingOnlyNodes' option, you will see phantom text nodes in the output (hex encoded to make them more clear) and the all-spaces node is (correctly) preserved. see screenshot.

      If you use the 'Default' option, you will not see these phantom text nodes and the all-spaces node is (correctly) filtered out.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            magdalenas Magdalena Stojek
            ev E Visser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes