Moved XML parsing related stuff to a separate file, made the parser customizable (a bit clunky regarding the arguments to template() now, but I guess it's good enough).
native