Data::Dump::XML::Parser - Restore data dumped by Data::DumpXML
use Data::Dump::XML::Parser; my $p = Data::Dump::XML::Parser->new; my $data = $p->parse_uri(shift || "test.xml");
The Data::Dump::XML::Parser is an XML::LibXML::SAX subclass that will recreate the data structure from the XML document produced by Data::Dump::XML. The parserfile() method returns a reference to an array of the values dumped.
Data::Dump::XML::Parser
XML::LibXML::SAX
Data::Dump::XML
The constructor method new() takes a single additional argument to that of XML::LibXML::SAX :
A subroutine that is invoked for blessing of restored objects. The subroutine is invoked with two arguments; a reference to the object and a string containing the class name. If not provided the built in bless function is used.
bless
For situations where the input file cannot necessarily be trusted and blessing arbitrary Classes might give the ability of malicious input to exploit the DESTROY methods of modules used by the code it is a good idea to provide an noop blesser:
my $p = Data::Dump::XML::Parser->new(Blesser => sub {});
Data::Dump::XML, XML::LibXML::SAX, Data::DumpXML::Parser
The Data::Dump::XML::Parser module is written by Ivan Baktsheev <dot.and.thing@gmail.com>, with support Ivan Kurmanov <kurmanov@openlib.og>.
Based on Data::DumpXML::Parser written by Gisle Aas <gisle@aas.no>.
Data::DumpXML::Parser
Copyright 2004-2009 Ivan Baktsheev Copyright 2003 Ivan Baktsheev, Ivan Kurmanov Copyright 2001 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::Dump::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Dump::XML
CPAN shell
perl -MCPAN -e shell install Data::Dump::XML
For more information on module installation, please visit the detailed CPAN module installation guide.