PDA

View Full Version : Read An Xml File



Alienxs
31st December 2006, 21:39
Hi, hello again to all of you, i have a pretty good question, is there anyway or better say any easy way to read an xml file using c++ code?? because im trying to develop an application wich will be configure through an xml file so i would like to know if anyone of you do know some libraries or classes that allow me to do this on an easy way not through fopen, fread, and fclose.

So please if you allready did this let me know or if you knoe how let me know too.
Well see ya and happy new year for all of you. :cool: :D

jacek
31st December 2006, 22:17
is there anyway or better say any easy way to read an xml file using c++ code?
Qt offers basic implementation of both SAX and DOM: http://doc.trolltech.com/3.3/xml.html

If you need something more complex, there are several Open Source libraries for C++ that handle XML.


Well see ya and happy new year for all of you.
Happy New Year for you too.

Brandybuck
31st December 2006, 23:16
Ditto. Qt makes using XML very easy. I refer the DOM API, but others prefer the SAX. Both are simple to use.

Qt is not merely a GUI toolkit, as too many think it is. Instead it is a complete application framework. Besides widgets you get XML, files, pervasive unicode, i18n, l10n, collection classes, sockets and networking, font handling, 2D graphic scenes, model/view patterns, printing, settings, etc, etc, etc.

stevey
5th January 2007, 01:28
I pray for a nice xml serialization framework that's as cool as .NET and Java's.
Although I understand that it's sometimes better to explicitly write the structure yourself, it's nice to be able to just call .serialize(....) on a class and get a file out the other end with minimal effort.