MINIMAL xml parser

Discussion in 'XML' started by Don HO, Dec 27, 2003.

  1. Don HO

    Don HO Guest

    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
     
    Don HO, Dec 27, 2003
    #1
    1. Advertising

  2. "Don HO" <> wrote in message news:<3fecec1f$0$1161$>...

    > 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
     
    Finnbarr P. Murphy, Dec 27, 2003
    #2
    1. Advertising

  3. 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
     
    Bennett Smith, Dec 29, 2003
    #3
  4. Don HO

    Don HO Guest

    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" <> a écrit dans le message de news:
    ...
    > "Don HO" <> wrote in message

    news:<3fecec1f$0$1161$>...
    >
    > > 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
     
    Don HO, Jan 4, 2004
    #4
  5. Don HO

    Daniel Haude Guest

    On 27 Dec 2003 10:50:47 -0800,
    Finnbarr P. Murphy <> wrote
    in Msg. <>

    > 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)
     
    Daniel Haude, Jan 5, 2004
    #5
  6. 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.)
     
    Johannes Koch, Jan 5, 2004
    #6
  7. Daniel Haude <-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
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 6, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roberto Nunnari
    Replies:
    0
    Views:
    411
    Roberto Nunnari
    Feb 26, 2004
  2. Mike

    minimal xml parser?

    Mike, Oct 25, 2004, in forum: XML
    Replies:
    16
    Views:
    1,367
  3. Roberto Nunnari

    new minimal xml parser Open Source

    Roberto Nunnari, Feb 26, 2004, in forum: C Programming
    Replies:
    0
    Views:
    618
    Roberto Nunnari
    Feb 26, 2004
  4. arne
    Replies:
    0
    Views:
    377
  5. Sean
    Replies:
    3
    Views:
    345
    robic0
    Oct 3, 2006
Loading...

Share This Page