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

Using QDomElement::setAttribute can create an invalid xml file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.5
    • Documentation, XML: DOM
    • None
    • All

    Description

      As the attached test case shows, it is easy to create invalid xml files without any warning or notice.

      In my opinion there should be at least a hint in the api description on https://doc.qt.io/qt-5/qdomelement.html#setAttribute.

      Besides the used value there are other values that should not be used, see https://www.w3.org/TR/xml11/#charsets.

      Attachments

        1. CMakeLists.txt
          0.5 kB
        2. test-xml.cpp
          0.9 kB
        3. test-xml.xml
          0.1 kB
        4. xmllint.log
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            docteam Qt Documentation Team
            rhabacker Ralf Habacker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes