473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

MINIMAL xml parser

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)?

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

Jul 20 '05 #1
6 3986
"Don HO" <do***@altern.org> wrote in message news:<3f**********************@news.free.fr>...
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
Jul 20 '05 #2

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/d...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

Jul 20 '05 #3
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


"Finnbarr P. Murphy" <fp*@hotmail.com> a écrit dans le message de news:
af**************************@posting.google.com...
"Don HO" <do***@altern.org> wrote in message news:<3f**********************@news.free.fr>...
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

Jul 20 '05 #4
On 27 Dec 2003 10:50:47 -0800,
Finnbarr P. Murphy <fp*@hotmail.com> wrote
in Msg. <af**************************@posting.google.com >
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

--
"With me is nothing wrong! And with you?" (from r.a.m.p)
Jul 20 '05 #5
Daniel Haude wrote:
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.


Document Object Model (<http://www.w3.org/DOM/>)
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #6
Daniel Haude <ha***@physnet.uni-hamburg.de> wrote:

A stupid question that's probably so basic that I didn't find it in the
FAQ:

There's always Google.

What is DOM?

http://www.google.com/search?q=DOM
--
Tad McClellan SGML consulting
ta***@augustmail.com Perl programming
Fort Worth, Texas
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Karalius, Joseph | last post by:
Can anyone explain what is happening here? I haven't found any useful info on Google yet. Thanks in advance. mmagnet:/home/jkaralius/src/zopeplone/Python-2.3.5 # make gcc -pthread -c...
3
by: Himanshu Garg | last post by:
Hello, I am trying to pinpoint an apparent bug in HTML::Parser. The encoding of the text seems to change incorrectly if the locale isn't set properly. However Parser.pm in the directory...
0
by: Roberto Nunnari | last post by:
Hi all. I announce that there's a brand new XML parser in the Open Source arena: NunniMCAX - release 1.0 http://nunnimcax.nunnisoft.ch/en/ NunniMCAX is a C, non validating XML parser. Its...
16
by: Mike | last post by:
Does anyone know of a minimal/mini/tiny/small xml parser in c? I'm looking for something small that accepts a stream or string, builds a c structure, and then returns an opaque pointer to that...
1
by: Tom | last post by:
I need a very, very minimal LaTeX system on Windows. I only need to have the possibility to get DVI files out of my tex files (with minimal fonts). An I need it without any installer (no settings...
0
by: Roberto Nunnari | last post by:
Hi all. I announce that there's a brand new XML parser in the Open Source arena: NunniMCAX - release 1.0 http://nunnimcax.nunnisoft.ch/en/ NunniMCAX is a C, non validating XML parser. Its...
28
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
18
by: Just Another Victim of the Ambient Morality | last post by:
Is pyparsing really a recursive descent parser? I ask this because there are grammars it can't parse that my recursive descent parser would parse, should I have written one. For instance: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.