Jacob
Jacob

Reputation: 34621

XML file Generator

Any recommendations for XML generators in C++?

Upvotes: 0

Views: 241

Answers (3)

Boaz Yaniv
Boaz Yaniv

Reputation: 6424

There are quite a few XML generators for C++. Some of them work with DOM, others can serialize your classes, and yet others work in even more different ways, like Boost.PropertyTree. Whichever you should choose, depends entirely on your requirements.

If you need to write a small set of data to an XML file (and may also want to write this data to other formats in the end), consider using Boost.PropertyTree. If you want to serialize C++ classes to XML, or make C++ class representation of XSD Schemas, consider using a binding generator such as CodeSynthesis XSD. And if you just want to manipulate the XML directly, you can use a DOM parser/writer like the cross-platform Xerces C++.

Upvotes: 4

ildjarn
ildjarn

Reputation: 62995

I'm sure there are a few that exist already, but if one were inclined to implement their own it would be an easy task using Boost.Spirit.Karma.

Upvotes: 0

Will A
Will A

Reputation: 25008

MSXML is a sensible option if you're limiting your application to Windows. Xerces could prove useful if you're wanting to write code that can be ported to other platforms.

Upvotes: 4

Related Questions