Faxpp Documentation
0.3
Faxpp is a small, fast and conformant XML pull parser written in C with an API that can return strings in any encoding including UTF-8 and UTF-16. Faxpp is written by John Snelson, and is released under the terms of the Apache Licence v2.
Faxpp provides two different APIs:
- The FAXPP_Parser API would normally suit the needs of most users. It provides an event based pull API for parsing XML documents.
- The FAXPP_Tokenizer API is a low level API giving direct access to the XML tokenizer. Output from this is not compliant with the XML specifications.
Faxpp's main performance benefit comes from it's ability to reduce and eliminate string copies - instead, the FAXPP_Text structure will point directly to the tokenizer's buffer when possible. This is possible when:
- The output string encoding is the same as the XML document's encoding.
- The event / token does not cross a buffer boundary when streaming input.
- The parser is not set to null terminate it's strings.
- Attribute values do not need to be normalized.
Therefore, to maximize the performance from faxpp the following steps can be taken:
- Choose not to null terminate output strings.
- Choose an output string encoding that is the same as most of the input XML documents that will be parsed.
- Stream XML documents using as large a buffer as possible.
- Turn off attribute value normalization by setting FAXPP_set_normalize_attrs() to 0 (this makes the parser non-conformant).
Generated on Thu Mar 20 02:12:09 2008 for Faxpp by
1.5.1