The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

stag-parse.pl - parses a file and fires events (e.g. sxpr to xml)

SYNOPSIS

  # convert XML to IText
  stag-parse.pl -p xml -w itext file1.xml file2.xml

  # use a custom parser/generator and a custom writer/generator
  stag-parse.pl -p MyMod::MyParser -w MyMod::MyWriter file.txt

DESCRIPTION

script wrapper for the Data::Stag modules

feeds in files into a parser object that generates nestarray events, and feeds the events into a handler/writer class

ARGUMENTS

-p|parser FORMAT

FORMAT is one of xml, sxpr or itext, or the name of a perl module

xml assumed as default

-w|writer FORMAT

FORMAT is one of xml, sxpr or itext, or the name of a perl module

-e|errf FILE

file to store parse error handler output

-errhandler FORMAT/MODULE

FORMAT is one of xml, sxpr or itext, or the name of a perl module

all parse error events go to this module

-color

Works only if the output handler is able to provide ASCII-colors (currently supported for itext and xml)

SEE ALSO

Data::Stag

This script is a wrapper for the method

  Data::Stag->parse()