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);
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.
This will be
elementat the top level.