XML::PatAct::ToObjects is an action module for creating Perl objects. SYNOPSIS use XML::PatAct::ToObjects; my $patterns =
XML::PatAct::ToObjects is an action module for creating Perl objects.
my $patterns = [ PATTERN => [ OPTIONS ],
PATTERN => "PERL-CODE",
my $matcher = XML::PatAct::ToObjects->new( Patterns => $patterns,
Matcher => $matcher,
CopyId => 1,
CopyAttributes => 1 );
XML::PatAct::ToObjects is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ToObjects creates Perl objects of the types and contents of the action items you define.
New XML::PatAct::ToObject instances are creating by calling `new()'. Parameters can be passed as a list of key, value pairs or a hash. `new()' requires the Patterns and Matcher parameters, the rest are optional:
The pattern-action list to apply.
An instance of the pattern or query matching module.
Causes the `ID' attribute, if any, in a source XML element to be copied to an `ID' attribute in newly created objects. Note that IDs may be lost of no pattern matches that element or an object is not created (-make) for that element.
Causes all attributes of the element to be copied to the newly created objects.
Each action can either be a list of options defined below or a string containing a fragment of Perl code. If the action is a string of Perl code then simple then some simple substitutions are made as described further below.
tags xml patact patact toobjects perl code newly created that element created objects `id attribute the action perl objects pattern action the pattern
Download XML::PatAct::ToObjects 0.08
Other software in this category
- Desktop Environment
- Science and Engineering
- Text Editing&Processing