libStreamedXML/src/docs/MainPage.dox

48 lines
1.9 KiB
Plaintext
Raw Normal View History

2006-07-31 17:21:55 +01:00
/* libStreamedXML/src/docs/MainPage.dox
*
* (c)2006, Laurence Withers, <l@lwithers.me.uk>.
* Released under the GNU GPLv2. See file COPYING or
* http://www.gnu.org/copyleft/gpl.html for details.
*/
/*! \mainpage
libStreamedXML is a C++ implementation of a
<a href="http://www.lwithers.me.uk/projects/StreamedXML/">
Streamed XML</a> processor. It is written using an efficient
state-machine and outputs UCS-4 data using the built-in std::wstring
type. It is written to accept an arbitrary byte stream, which may be
interrupted and restarted at any point, as input.
libStreamedXML uses a three-layer design. The lowest layer is the
character decoder layer, which takes raw bytes as input and outputs
UCS-4 characters. Its output is pushed to the middle layer, which is the
Streamed XML parser. This layer interprets character data into XML
structures, and pushes its results onto the top layer, which is the
callback layer. This layered design allows for flexibility and a
conciseness of both design and implementation.
The callback layer is implemented in the lsx::Callback class. You
simply override the functions in a derived class to achieve the
behaviour you want. The callback layer is only ever presented
well-formed Streamed XML data; errors are handled at the other end of
the stack.
The parser layer is implemented in the lsx::Parser class. You will have
to instantiate this class, but you should never have to derive from it,
since its functionality is fixed to the standard.
The character decoder layer is implemented in the lsx::Decoder class.
However, since the lsx::Parser class has no direct link to it, there is
no need to use this class (or any class at all). You can supply the
input in whatever way you see fit. The lsx::Decoder class provides a
UTF-8 decoder and allows exceptions to propagate out of its feedData()
method.
*/
/* options for text editors
kate: replace-trailing-space-save true; space-indent true; tab-width 4;
vim: expandtab:ts=4:sw=4
*/