Editing XML file from Qt
Solved
General and Desktop
-
wrote on 24 Feb 2020, 06:13 last edited by
Can anyone tell how can I edit an XML file from my Qt C++ code?
-
wrote on 24 Feb 2020, 06:58 last edited by JohanSolo
You can use the (deprecated) QtXml module, or the StAX API, directly in Qt core
IIRC. -
-
wrote on 24 Feb 2020, 09:39 last edited by
can we do this using SAX handler?
-
@VJain85
What do you mean by SAX handler ?The QXmlStreamReader is a SAX interface.
-
wrote on 24 Feb 2020, 11:28 last edited by
@VJain85
If you want to do your processing via theQXmlStreamReader/Writer
SAX-type parser that is fine. Note however that means you will not be editing the XML "in place"/"in memory", instead you will be reading the file incrementally and outputting the edited XML to a new file as you go along.
1/7