MINIMAL xml parser

D

Don HO

Hi,

I'm developing a project in C++ under MS Windows (without MFC).

I want to use an xml file as the configuration file of the program. The
problem is :
after downloading xerces, I realized that xerces is too heavy for my
program -
- the total size of all the binaries of my project is only 800 KB,
whereas the size of xerces dll is more than 2 MB!!!

I thought of the parser of M$, but forget it, I have to use MFC if I use it.

All I want is to read (for getting the parameters) a xml file and
to write (for saving the parameters) it.
Does it exist a minimal & reliable xml parser only for this purpose (for
DOM)?
 
F

Finnbarr P. Murphy

Don HO said:
All I want is to read (for getting the parameters) a xml file and
to write (for saving the parameters) it.
Does it exist a minimal & reliable xml parser only for this purpose (for
DOM)?

Have a look at the expat XML parser (www.libexpat.org).
Its fairly small. It does not have DOM support built in and is
written in C rather than C++ but there are wrappers for both
available.

Another (tiny!) parser is TinyXML (www.grinninglizard.com/tinyxml)
Never used this particular parser myself but it claims C++ and
DOM support.

- Finnbarr
 
B

Bennett Smith

Don,

You mentioned that you were not interested in the Microsoft parser because
it required the use of MFC. Actually, there is no requirement to use MFC or
ATL when using the MS parser. This parser is a COM component and can easily
be used with any C/C++ application. It is a very good parser too, with SAX
and DOM support built-in. I would suggest taking another look at it since
most current Windows platforms have this parser already included. You can
download the Microsoft XML parser SDK from
http://www.microsoft.com/downloads/...2b-b4f2-46da-b4b6-c5d7485f2b42&DisplayLang=en. I
have some notes that include an example of using this parser at
http://www.idevelopsoftware.com/courses/msxmldev/. Take a look at the
Module7.zip file. There is a C++ example of using the XML parser to build
an XML file programmatically.

Cheers

-- Bennett
 
D

Don HO

Thank you very much Murphy.

I gave a try to the parser of TinyXML, it works fine (truly C++ and DOM
support).
Especially it's really "tiny"!!! Its generated binary code is only 40 KB (vs
2 MB if I use xerces)!

--
Don HO
http://notepad-plus.sourceforge.net/
a powerful free (and open source) multi-function editor
 
D

Daniel Haude

On 27 Dec 2003 10:50:47 -0800,
in Msg. said:
Another (tiny!) parser is TinyXML (www.grinninglizard.com/tinyxml)
Never used this particular parser myself but it claims C++ and
DOM support.

A stupid question that's probably so basic that I didn't find it in the
FAQ: What is DOM? I think I saw the expansion of the acronym, but it
didn't make any sense to me.

Thanks,
**Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to implement a html parser in java? 1
XML parser: Element ordering? 0
expat XML parser manpage 2
minimal xml parser? 16
XML Parser 1
NunniMCAX: new minimal xml parser Open Source 0
Vanilla XML parser 10
Minimal-D 3

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top