in reply to Can i mange XML::LibXML to do an include? Or is there another XML module that does it?
See the documentation of XML::LibXML::Parser:
use warnings; use strict; use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file("foo.xml"); $parser->processXIncludes( $doc ); print $doc->toString(1); __END__ <?xml version="1.0"?> <foo> <bar> This is bar.xml! </bar> </foo>
Update: Alternatively, my $doc = XML::LibXML->load_xml( expand_xinclude => 1, location => "foo.xml" );
|
|---|