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

XQuery implementation outputs CDATA sections as escaped XML instead of raw data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5: Not important
    • 5.15
    • 4.7.4, 4.8.0
    • XML: QtXmlPatterns
    • None
    • Qt SDK 1.2.1

    Description

      XQuery on CDATA sections returns result as escaped XML text instead of original raw data.

      Example code (see complete project attached) :

      QXmlQuery xQuery;
      xQuery.setQuery("doc('test.xml')/xml/string()");
      QString result;
      xQuery.evaluateTo(&result);
      qDebug() << "Result = " << result;

      With the following input test.xml file :

      <xml>
      <![CDATA[<tag>test</tag>]]>
      </xml>

      returns escaped output:
      &lt;tag&gt;test&lt;/tag&gt;

      instead of the correct output :
      <tag>test</tag>

      XQuery engine should leave the CDATA section untouched without any extra encoding because that's what CDATA sections are meant for.

      Attachments

        1. bugxquery.zip
          3 kB
          Rémy DAVID
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            axelspoerl Axel Spoerl
            remy_david Rémy DAVID
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes