How to read and get the values out of the xml file and set text to the textfields?
How to read and get the values out of the xml file and set text to the textfields?
Please search previous threads. This has been discussed recently.
One link is this
but they are creating and write on the xml file.. i need to noe how to read and get values out from the xml file and put into the textfield.
Use QDomDocument as suggested.
How to use QDomDocument??
Can i have the sample?? to retrieve values from xml file...
thanks
it is a simple example for read <position x="12",y="13"/> , good luck!Qt Code:
QDomElement domElement if ( !domElement.isNull() ) { if ( elementName.compare( "position" ) == 0 ) { // Convert to position QPoint p0; p0.setX( domElement.attribute( "x" ).toInt() ); p0.setY( domElement.attribute( "y" ).toInt() ); } }To copy to clipboard, switch view to plain text mode
Last edited by jpn; 21st July 2008 at 18:58. Reason: missing [code] tags
thanks.. i will try..
Bookmarks