Qt-interest Archive, September 2002
How to add <?xml version="1.0" ?>
Message 1 in thread
Hi
is there any chance to add the first line
<?xml version="1.0" encoding="UTF-8" ?>
to a QDomDocument when using the Qt DOM implementation. I can create the
<!DOCTYPE bla> as the first line, but nothing else. The only chance I see
is to simply add this line manually to the output stream (QTextStream): "ts
<< <?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
This is only a workaround that I don't like.
I have the same problem for adding a comment between the root document and
the DOCTYPE == add a QDomElement before the QDomDocumentElement.
How can I add elements between/before the root element??
When I look at the Qt sources, the also simply use the TextStream, but
isn't there a smarter solution??
Thanks for you help
Alex
Visit us at our Website http://www.Aladdin.de
**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or the
sender immediately and do not disclose the contents to any one or make copies.
** eSafe ESG MUC scanned this email for viruses, vandals and malicious content **
**************************************************************************************************
Message 2 in thread
> is there any chance to add the first line
> <?xml version="1.0" encoding="UTF-8" ?>
I am not absolutly sure if I remember correct, but I think it is
createProcessingInstruction("xml", "version = '1.0'")