NAME

PYX::XMLSchema::List - Processing PYX data or file and print list of XML schemas.

SYNOPSIS

use PYX::XMLSchema::List;

my $obj = PYX::XMLSchema::List->new(%parameters);
$obj->parse($pyx, $out);
$obj->parse_file($input_file, $out);
$obj->parse_handler($input_file_handler, $out);
$obj->reset;
my $stats_hr = $obj->stats;

METHODS

new

my $obj = PYX::XMLSchema::List->new(%parameters);

Constructor.

  • output_handler

    Output handler.

    Default value is \*STDOUT.

Returns instance of object.

parse

$obj->parse($pyx, $out);

Parse PYX text or array of PYX text and print list of XML schemas of PYX input. If $out not present, use 'output_handler'.

Returns undef.

parse_file

$obj->parse_file($input_file, $out);

Parse file with PYX data and print list of XML schemas of PYX input. If $out not present, use 'output_handler'.

Returns undef.

parse_handler

$obj->parse_handler($input_file_handler, $out);

Parse PYX handler and print list of XML schemas of PYX input. If $out not present, use 'output_handler'.

Returns undef.

reset

$obj->reset;

Resets internal structure with statistics.

Returns undef.

stats

my $stats_hr = $obj->stats;

Gets statistics structure.

Returns undef.

ERRORS

new():
        From Class::Utils::set_params():
                Unknown parameter '%s'.

EXAMPLE1

use strict;
use warnings;

use PYX::XMLSchema::List;

# Example data.
my $pyx = <<'END';
(foo
Axmlns:bar http://bar.foo
Axmlns:foo http://foo.bar
Afoo:bar baz
(foo:bar
Axml:lang en
Abar:foo baz
)foo:bar
)foo
END

# PYX::XMLSchema::List object.
my $obj = PYX::XMLSchema::List->new;

# Parse.
$obj->parse($pyx);

# Output:
# [ bar ] (E: 0000, A: 0001) http://bar.foo
# [ foo ] (E: 0001, A: 0001) http://foo.bar
# [ xml ] (E: 0000, A: 0001)

DEPENDENCIES

Class::Utils, Error::Pure, List::Util, PYX::Parser, Readonly.

SEE ALSO

PYX

A perl module for PYX handling.

Task::PYX

Install the PYX modules.

REPOSITORY

https://github.com/michal-josef-spacek/PYX-XMLSchema-List

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2015-2023 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.05