I've Problems how to read an XML-File. It can't be read because of the structure of the header (<? ... >. Well creating this with: ---- QDomDocument myDoc("meinDokument"); //Wurzelelement QDomElement rootElem = myDoc.createElement(QString("wurzel-tf2")); myDoc.appendChild(rootElem); ---- ist works, but in the XML-File ist sth like: <!DOCTYPE ...>. But I don't want a docfile but an XML-File without a docfile.
There's a possibility to create an header like this: ----- // Dokumentbaum herstellen QDomImplementation myDomImpl = QDomImplementation(); QDomDocument myDoc = myDomImpl.createDocument( QString::null, QString("?xml version=\"1.0\"?"), QDomDocumentType()); //Wurzelelement QDomElement rootElem = myDoc.createElement(QString("wurzel-tf2")); myDoc.appendChild(rootElem); ---- <? .... ?\> Now you can't read the file, becaus of the "\" in front of the ">". How can I create a XML-File with sth like this: <?xml version="1.0"?>
MfG Spacelord -- .....Ich mach jetzt nämlich mein Jodeldiplom.Dann hab ich endlich was Eigenes.Dieser Post wurde am 17.02.2006 um 00:37 Uhr von Spacelord editiert.