SXP 1.1 reviewDownload
SXP stands for Simple XML Persistence, and is a quick-and-dirty C++ library I threw together
SXP stands for Simple XML Persistence, and is a quick-and-dirty C++ library I threw together. It provides a simple (I hope) mechanism for enabling the objects in your application to persist themselves (i.e. read from and write to) to a XML file. SXP is built as a C++ wrapper around James Clark's excellent expat parser.
Here are some key features of "SXP":
ease of use: a major design goal for it was adding XML persistence to a class to take around 2 line of code per class member (one for reading and one for writing). Efficiency concerns and C++ syntax quirks expanded this number to around 4 lines of code per class member (plus some fixed overhead); still, you should be able to add XML persistence to your classes in a minutes, rather than hours.
efficiency: XML persistence via SXP adds to your persistable objects four virtual functions and no data members. If you need to support persisting of object references, you might need to add a single pointer to your objects. SXP can be used directly with all but the most lightweight of objects. SXP uses hash tables and works with one string compare ( strcmp() ) per XML tag in the input file. SXP reuses its internal objects from a pool to avoid constant allocation/deallocation of small objects.
acceptable performance: SXP is more than fast enough for prototyping applications and even for small-to-medium production-level projects.
SXP 1.1 search tags