use AnySAXParser; use XML::XPath::Builder; $builder = XML::XPath::Builder->new(); $parser = AnySAXParser->new( Handler => $builder ); $root_node = $parser->parse( Source => [SOURCE] );
"XML::XPath::Builder" is used by creating a new instance of "XML::XPath::Builder" and providing it as the Handler for a SAX parser. Calling `"parse()"' on the SAX parser will return the root node of the tree built from that parse.
PerlSAX.pod in libxml-perl
Extensible Markup Language (XML) <http://www.w3c.org/XML>