Small XML parser in C
A Small XML parser written in C.
Inspired by the clean API design used by the JSON parser JSMN, SXML has the same design goal and features for XML parsing. Go read about JSMN’s Philosophy and Features to get an idea of how it differs to other parsers - I’ll wait right here.
Here is a list of features SXML shares with JSMN.
The header file is heavily commented and should be the first place to look to get started.
Check out the file sxml_test.c for an example of using SXML within a constrained environment with a fixed sized input and output buffer.
In order to remain lightweight the parser has the following limitations:
Do contact me with suggestions if the limitations above are preventing you from using the parser.
List of alternative lightweight XML parsers considered before writing my own.