XML::Invisible::Receiver - XML::Invisible Pegex AST constructor
my $grammar = Pegex::Grammar->new(text => $grammar_text); my $parser = Pegex::Parser->new( grammar => $grammar, receiver => XML::Invisible::Receiver->new, ); my $got = $parser->parse($ixml_text);
Subclass of Pegex::Receiver to turn Pegex parsing events into data usable by XML::Invisible.
The AST returned represents an XML document with a hash-ref with these keys:
A hash-ref mapping name to value, since XML attributes can each only occur once on an element, and the ordering is semantically meaningless.
An array-ref of child nodes. If the node is a simple scalar, it is a text node.
To install XML::Invisible, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Invisible
CPAN shell
perl -MCPAN -e shell install XML::Invisible
For more information on module installation, please visit the detailed CPAN module installation guide.