hi , i am begginer in Qt . i unable to update and delete the data in an xmlfile using the Qt application. please can anybody tell me how to solve my problem. Attaching the xmledit file. please find the attachment.
hi , i am begginer in Qt . i unable to update and delete the data in an xmlfile using the Qt application. please can anybody tell me how to solve my problem. Attaching the xmledit file. please find the attachment.
Well, working with QDomDocument is easier.
QDomDocument::setContent and QDomDocument::toString might be what you need to read and write xml.
sir,
i have five .ui forms. Total .ui forms information should store in a single xml file. can we do this using QDomDocument?
Last edited by rk0747; 28th January 2010 at 10:46. Reason: Clear explanation
Yes it is possible.
First decide a XML format with initial data if necessary otherwise with blank data. Create in memory view of this XML and ensure all read write by ui forms are done in this XML(QDomDoc). At the time of applicatio exit save the content of this XML to file.
QDomDocument doc("mydocument");
QFile file("mydocument.xml");
file.open(QIODevice::ReadOnly)
doc.setContent(&file)
file.close();
//.........
// Modify your XML here
//.........
QString savedXML=doc.toString();
QTextStream tempTS(&savedXML);
dom.save(tempTS,0);
rk0747 (28th January 2010)
ok, but i am very new to QdomDocument and i saw some examples i did n't understood due to more files and big code, please if u possible can u send me how to create and retrive the data from xml using QDomdocument or any sample code .
i am struggling for this from 3 weeks .please help me.
Thanks
Download this book:
http://www.qtrac.eu/C++-GUI-Programm...t-4-1st-ed.zip
and start reading from page 344.
It won't get easier than this...
Bookmarks