PYX::XMLNorm - Processing PYX data or file and do XML normalization.
use PYX::XMLNorm; my $obj = PYX::XMLNorm->new(%parameters); $obj->parse($pyx, $out); $obj->parse_file($input_file, $out); $obj->parse_handle($input_file_handler, $out);
new(%parameters)
Constructor.
flush_stack
Flush stack on finalization. Default value is 0.
output_handler
Output handler. Default value is \*STDOUT.
rules
XML normalization rules. Parameter is required. Format of rules is: Outer element => list of inner elements. e.g. { 'middle' => ['end'], }, Outer element can be '*'. Default value is {}.
parse($pyx[, $out])
Parse PYX text or array of PYX text. If $out not present, use 'output_handler'. Returns undef.
parse_file($input_file[, $out])
Parse file with PYX data. If $out not present, use 'output_handler'. Returns undef.
parse_handler($input_file_handler[, $out])
Parse PYX handler. If $out not present, use 'output_handler'. Returns undef.
new(): Cannot exist XML normalization rules. From Class::Utils::set_params(): Unknown parameter '%s'.
# Pragmas. use strict; use warnings; # Modules. use PYX::XMLNorm; # Example data. my $pyx = <<'END'; (begin (middle (end -data )middle )begin END # Object. my $obj = PYX::XMLNorm->new( 'rules' => { 'middle' => ['end'], }, ); # Nomrmalize.. $obj->parse($pyx); # Output: # (begin # (middle # (end # -data # )end # )middle # )begin
Class::Utils, Error::Pure, PYX, PYX::Parser.
A perl module for PYX handling.
Install the PYX modules.
https://github.com/tupinek/PYX-XMLNorm
Michal Špaček skim@cpan.org.
© 2011-2015 Michal Špaček BSD 2-Clause License
0.04
To install PYX::XMLNorm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PYX::XMLNorm
CPAN shell
perl -MCPAN -e shell install PYX::XMLNorm
For more information on module installation, please visit the detailed CPAN module installation guide.