Is it OK to omit calling QXmlStreamWriter::writeStartDocument()?



When creating XML files with QXmlStreamWriter, I see that all that QXmlStreamWriter::writeStartDocument() does is add a <?xml version="1.0" encoding="UTF-8"?> at the top.


But in my case, I'm outputting an XML by specification from a client, and his example lacks this, so is it OK to just skip calling QXmlStreamWriter::writeStartDocument() and QXmlStreamWriter::writeEndDocument()?


Or will there be any harmful side effects?


No comments:

Post a Comment