View Full Version : QDomDocument DTD location
Rayven
30th August 2008, 02:13
When creating a QDomDocument
QDomDocument doc( "Report" );
How do I tell the XML file the location of the DTD to use. For example:
<!DOCTYPE Report SYSTEM "report.dtd"> how do I put the SYSTEM "report.dtd" into the DTD description. I have looked through the API and there is nothing about adding an reference to a DTD location.
Thanks!
spirit
30th August 2008, 09:21
maybe this method can help you
http://doc.trolltech.com/4.4/qdomdocument.html#createProcessingInstruction
aamer4yu
30th August 2008, 11:07
Am not sure if QXmlStreamWriter::writeDTD wil help you....
Rayven
30th August 2008, 16:35
maybe this method can help you
http://doc.trolltech.com/4.4/qdomdocument.html#createProcessingInstruction
The createProcessingInstruction places a processing instruction: <?...?> marker.
Am not sure if QXmlStreamWriter::writeDTD (http://doc.trolltech.com/latest/qxmlstreamwriter.html#writeDTD) wil help you....
This is based on the QXmlStreamWriter class instead of the QDomDocument and outputs a DTD based on the input argument. The QDomDocument automatically creates the "<!DOCTYPE" line for you for referencing a DTD.
Thanks, for trying though!
jacek
30th August 2008, 18:22
See QDomImplementation::createDocumentType().
Rayven
2nd September 2008, 18:15
See QDomImplementation::createDocumentType() (http://doc.trolltech.com/latest/qdomimplementation.html#createDocumentType).
This worked! Thanks!
Cuellar1088
15th January 2011, 07:30
QDomImplementation:: createDocumentType () como lo utilizas para Hacer el parser, podrias subir un ejemplo chiquito.
?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.