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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 4.7.4, 4.8.0
    • Fix Version/s: None
    • Component/s: XML: QtXmlPatterns
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              Unassigned
              Reporter:
              remy_david Rémy DAVID
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes