Basic tutorial

This short example shows how to create a simple program which uses lsxml to read, modify and write a XML document.
#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;
}