The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::Invisible::Receiver - XML::Invisible Pegex AST constructor

SYNOPSIS

  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);

DESCRIPTION

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:

nodename
attributes

An array-ref with pairs of name, value (in order to preserve ordering).

children

An array-ref of child nodes. If the node is a simple scalar, it is a text node.

type

This will be element at the top level.