[Qt-interest] How can change value of node in XML file?

Rui Maciel rui.maciel at gmail.com
Fri Sep 30 20:00:01 CEST 2011


Prot Netin wrote:

> Hi all,
> 
> I have a xml file such as:
> <config>
> <lm>100</lm>
> </config>
> 
> How can i update 100 to new value such as 50?
> 
> I can get 100 from file using QDomDocument, QDomNode, QDomElement classes
> and QDomElemet::text method. But i can not update file. How can i do that?
> which class or function should i use to update <lm>100</lm> to
> </lm>50</lm>?

What happens when you call your QDomDocument object's QDomDocument::save() ?  
Does it throw an error?


Rui Maciel



More information about the Qt-interest-old mailing list