This library is minimum, easy-to-use, C implementation for xml file parsing It includes:
the library libroxml for xml parsing inside applications.
the binary roxml, an xpath resolver that can be used from shell.
the module fuse.xml that can be used to mount an XML file as a filesystem.
the full public API and private API documentation.
The stripped binary is about 50K. The public API defines less than 30 functions to do all you need, making it very easy to start with. For bug reporting, you can check the google code dedicated project: http://libroxml.googlecode.com
Libroxml is distributed under the terms of the GNU Lesser General Public License.
The source code is available from google project GIT repository:
$> git clone https://code.google.com/p/libroxml
You can download source packages:
Because XML parsing is always hard to reinvent, and because very often xml lib are too big to fit with very little application. Libroxml target mainly embedded software and environment, but you can use it whenever you need to deal with XML since libroxml is ligth and fast. libroxml is now provided in buildroot (http://buildroot.uclibc.org).
libroxml allow you to easily:
load / unload XML document from buffers or files.
navigate thru an xml tree using simple getter API.
use xpath syntax to access some nodes in the XML tree.
read nodes contents (text, attributes, comments ...)
create/modify xml trees and save them to a file or buffer.
- libroxml work with both strict XML documents but also with xml like formatted documents (without any <?xml?> definition...)
- libroxml may behave strangely when dealing with node names or attribute values bigger than 512 bytes. FOr those who really need it, they can increase this limit by modifying the ROXML_LONG_LEN define in roxml-defines.h.
libroxml do not handle DOCTYPE nodes. However, it will nicely ignore them during parsing and will still return the xml tree.
libroxml is not thread safe for all write operations (roxml_set_ns, roxml_add_node, roxml_del_node) therefore, those functions must be granted exclusiv access to the xml tree when called. On the other hand, all other functions can be safely called simultaneously.
<how does it work>
You can refer to public API for documentation on all functions
there are several groups of functions in public API:
Load and close XML data from different sources.
Get nodes and navigate into the loaded xml tree.
Get the xml content of nodes, attributes...
Create and delete nodes, export tree.
Some libroxml specific functions for memory handling
</how does it work>