Wrapper around libxml-sax that builds a DOM tree