A simple C XML parser

Libxml2


The Expat parser is the best I've come across - I use it in my C++ code in preference to the various C++ parsers - but it is written in C. Very easy to use and embed in your application. So I don't see why in your question you say:

(other than lib eXpat)

do you have something against it?


How about Mini-XML? It's lightweight, works with gcc, is ANSI-C compatible...

http://www.minixml.org/index.php

According to the documentation, to search for specific nodes would be as simple as:

/* Find the first "a" element */
    node = mxmlFindElement(tree, tree, "a",
                           NULL, NULL,
                           MXML_DESCEND);

Once you get the node, you can manipulate it according to your requirements.

Tags:

C

Xml