What is lsxml
lsxml is a lightweight, cross-platform XML processing library for C++. Meant to serve as a tool for quickly and efficiently handling large amounts of XML data.
What lsxml is not
Looking for a large, complex, standards-compliant XML parser? You won't find it here.
The library does not recognize nor support (in another way than ignoring them) any advanced XML features like DTD, namespaces, entity declaration, XPath, XSLT, etc.
Features
-
Small and light
Consists only of a single, ~2500 line long header file. No compilation, no large DLLs to download, link and redistribute.
No additional dependencies - completely self-sufficient, does not include any external headers (except for
<fstream>
if the user wishes to have file support). -
Fast and efficient
Designed with performance as the top priority. Takes advantage of C++ features which increase performance (templates, preferring stack over heap allocation whenever it's possible) while avoiding dynamic string objects, STL containers (and generic containers generally), overuse of heap allocation, etc.
Uses a custom memory management system, which greatly improves performance, increases memory efficiency (reduces heap fragmentation), prevents memory leaks and eliminates the need of freeing memory explicitly.
The system can even be used to utilize the stack as the only memory source - parse a XML file and build the DOM tree completely on the stack - without a single call to
malloc()
!. -
Flexible
Template based - supports both multibyte and wide character sets.
Offers two methods for processing XML documents:
-
The sequential parser (the
XmlReader
class) provides a fast, forward only way to read XML data. -
DOM classes (descendants of the
XmlNode
class) allow the user to manipulate documents using a simple object model.
-
The sequential parser (the