.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "STAG-PARSE 1p" .TH STAG-PARSE 1p "2016-05-29" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" stag\-parse \- parses a file and fires events (e.g. sxpr to xml) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # convert XML to IText \& stag\-parse \-p xml \-w itext file1.xml file2.xml \& \& # use a custom parser/generator and a custom writer/generator \& stag\-parse \-p MyMod::MyParser \-w MyMod::MyWriter file.txt .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" script wrapper for the Data::Stag modules .PP feeds in files into a parser object that generates nestarray events, and feeds the events into a handler/writer class .SH "ARGUMENTS" .IX Header "ARGUMENTS" .IP "\-p|parser \s-1FORMAT\s0" 4 .IX Item "-p|parser FORMAT" \&\s-1FORMAT\s0 is one of xml, sxpr or itext, or the name of a perl module .Sp this is the class that parsers the input file(s) and generates stag events .Sp xml assumed as default .IP "\-w|writer \s-1FORMAT\s0" 4 .IX Item "-w|writer FORMAT" \&\s-1FORMAT\s0 is one of xml, sxpr or itext, or the name of a perl module .Sp this is the class that catches the events thrown by the parser; it can be any class, but the class is typically a writer .Sp xml assumed as default .IP "\-o|out \s-1FILE\s0" 4 .IX Item "-o|out FILE" the writer will use this file (defaults to \s-1STDOUT\s0) .IP "\-e|errf \s-1FILE\s0" 4 .IX Item "-e|errf FILE" file to store parse error handler output .IP "\-errhandler \s-1FORMAT/MODULE\s0" 4 .IX Item "-errhandler FORMAT/MODULE" \&\s-1FORMAT\s0 is one of xml, sxpr or itext, or the name of a perl module .Sp all parse error events go to this module .IP "\-r|root \s-1NODE_NAME\s0" 4 .IX Item "-r|root NODE_NAME" if this is specified, \s-1NODE_NAME\s0 becomes the root of the stag tree, and anything that was previously the root is placed below this. .Sp this happens automatically if more than one file is parsed (because there can only be one tree root) .IP "\-color" 4 .IX Item "-color" Works only if the output handler is able to provide ASCII-colors (currently supported for itext and xml) .SH "SEE ALSO" .IX Header "SEE ALSO" Data::Stag .PP This script is a wrapper for the method .PP .Vb 1 \& Data::Stag\->parse() .Ve