lsxml

0.91

Author:
Wojciech Kurek

Introduction

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.

Simple example

The following short code snippet demonstrates how to load, modify and write a XML document using the library.
#include "lsxml.h"

int main() {
        //declare the context
        lsxml::Context ctx;
        
        //declare a document object
        lsxml::XmlDocument<char> doc;

        //load the document from a file
        doc.LoadFile("test.xml");

        //find a descendant element
        lsxml::XmlElement* e = doc.GetDescendant("some-element");
        if(e != NULL) {
                //obtain the text contained
                //in the element
                const char* text = e->GetInnerText();

                //change the element's text
                e->SetInnerText("some text");
        }

        //save the document
        doc.SaveFile("test.xml");
        
        return 0;
}

Generated on Tue Sep 29 14:51:12 2009 for lsxml by  doxygen 1.5.1-p1