By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,983 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,983 IT Pros & Developers. It's quick & easy.

C++ XML parsers?

P: n/a
Hi,
Is there any good open-source C++ XML parser library that isn't as huge as
Xerces? The Xerces DLL is about 2.4 Mb in size, which is far too big for my
application. (It doesn't seem to be possible to link Xerces statically.)

The parser doesn't need to do DTD/Schema validation, but it should be able
to expand entities. I also need a DOM to navigate the document. XPath
querying would be nice, but is not essential.

Any ideas?
Thanks
-Laurens
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Wed, 04 Feb 2004 17:15:13 +0100, Laurens wrote:
Is there any good open-source C++ XML parser library that isn't as huge as
Xerces? The Xerces DLL is about 2.4 Mb in size, which is far too big for my
application. (It doesn't seem to be possible to link Xerces statically.)


There are also libxml2 and expat in the C/C++-world.

Bernd
--
Bernd Petrovitsch Email : be***@bofh.at
"For I was talking aloud to myself. A habit of the old: they choose
the wisest person present to speak to; the long explanations needed
by the young are wearying." --- Gandalf, the White

Jul 20 '05 #2

P: n/a
I have used expat from http://www.jclark.com/xml/expat.html and recommend
it.

John

"Bernd Petrovitsch" <be***@bofh.at> wrote in message
news:pa****************************@bofh.at...
On Wed, 04 Feb 2004 17:15:13 +0100, Laurens wrote:
Is there any good open-source C++ XML parser library that isn't as huge as Xerces? The Xerces DLL is about 2.4 Mb in size, which is far too big for my application. (It doesn't seem to be possible to link Xerces statically.)


There are also libxml2 and expat in the C/C++-world.

Bernd
--
Bernd Petrovitsch Email : be***@bofh.at
"For I was talking aloud to myself. A habit of the old: they choose
the wisest person present to speak to; the long explanations needed
by the young are wearying." --- Gandalf, the White

Jul 20 '05 #3

P: n/a
Hi.

If you're not interested in validating, watch out for NunniMCAX,
my C parser that will come out soon. About 60KB in size..

see NunniMJAX at http://nunnimjax.nunnisoft.ch
...that's its java brother that was just released last week.

It's Open Source!

Best regards.
Laurens wrote:
Hi,
Is there any good open-source C++ XML parser library that isn't as huge as
Xerces? The Xerces DLL is about 2.4 Mb in size, which is far too big for my
application. (It doesn't seem to be possible to link Xerces statically.)

The parser doesn't need to do DTD/Schema validation, but it should be able
to expand entities. I also need a DOM to navigate the document. XPath
querying would be nice, but is not essential.

Any ideas?
Thanks
-Laurens


Jul 20 '05 #4

P: n/a
In article <bv**********@reader11.wxs.nl>, Laurens <sp**@block.com> wrote:

% The parser doesn't need to do DTD/Schema validation, but it should be able
% to expand entities. I also need a DOM to navigate the document. XPath
% querying would be nice, but is not essential.

There are a few options, which I will try to enumerate. You'll
have to search for urls. You don't mention the platform. I'll assume
win32 since you mention a DLL.

libxml2 -- full-featured (various types of validation, Dom-ish and SAX-ish
APIs, xPath, a related xslt library, and on and on), but almost
as large as xerces in the win32 binary distribution. You can
recompile with features turned off, so you might get it down to
a size you can live with.
expat -- SAX-ish API only, non-validating. less than 100k
rxp -- DTD validation. Name space support. I'm not sure how you'd
describe the API. About 300k -- I'm not sure if there's an
NT port, but how hard could it be?
tinyxml -- less than 100k. DOM-ish API. I've never tried this -- the
readme said it didn't use DTDs (so probably not suitable for
your purposes).

I'm pretty sure I've forgotten one. The first three are C and the last is
C++.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.