Generate XML file from C++

Hi,

I need to generate an XML file as output for a C++ program.

Immediate idea that came across to me was through fprintf by mentioning all the attribute names/fields in the XML file one by one and inserting the values there which I get from C++ program.

Is there any other better way to do that? If that how?

Thanks in advance.

You can use Xerces-C++ XML Parser thread-safe library to solve your problem.

Best regards,

Iliyan Varshilov

Or libxml2. This is immensely popular in open source projects and an integral part of typical Linux-based systems.

The XML C parser and toolkit of Gnome