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

Using QDomElement::setAttribute can create an invalid xml file

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes