• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

xml file

I create and save an xml in C++

MSXML::IXMLDOMDocumentPtr L_comXmlDoc(__uuidof(MSXML::DOMDocument));

I use createElement to create elements
then I use the save function

My problem is that all my elements
are in memory so I have memory problems
if I have to many elements. Elements
are saved in file only at the end of my code

I would like to create elements
and save them each time in the xml file
to avoid memory problems

Any idea how to do that?

1 Solution
Are you creating your elements in a top down manner?  If so, don't use the object model and just implement your own XML builder (i.e. just write the xml as you build it).  Otherwise, I'm pretty sure you can't tell the MSXML objects to write as they go.


Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now