[Qt-interest] QXmlStreamWriter setCodec

Sylvain Pointeau sylvain.pointeau at gmail.com
Wed Dec 3 10:44:30 CET 2008


Hello,

I am using QXmlStreamWriter like

    QXmlStreamWriter writer( &fout );
    writer.setCodec("UTF-8");
    writer.setAutoFormatting( true );

and the output is not usable, see the error from xsltproc:

output.xml:1: parser error : String not closed expecting " or '
<?xml version="1.0" encoding="UTF-8"?>
               ^
output.xml:1: parser warning : Unsupported version ''
<?xml version="1.0" encoding="UTF-8"?>
               ^
output.xml:1: parser error : Blank needed here
<?xml version="1.0" encoding="UTF-8"?>
               ^
output.xml:1: parser error : parsing XML declaration: '?>' expected
<?xml version="1.0" encoding="UTF-8"?>
               ^
unable to parse output.xml


I know that the output is by default UTF-8,
but why do I have this error? seems weird.

I am running Macosx Qt 4.4.2.

Anyone can help?

Cheers,
Sylvain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081203/ab489e94/attachment.html 


More information about the Qt-interest-old mailing list