1STAG-PARSE(1) User Contributed Perl Documentation STAG-PARSE(1)
2
3
4
6 stag-parse - parses a file and fires events (e.g. sxpr to xml)
7
9 # convert XML to IText
10 stag-parse -p xml -w itext file1.xml file2.xml
11
12 # use a custom parser/generator and a custom writer/generator
13 stag-parse -p MyMod::MyParser -w MyMod::MyWriter file.txt
14
16 script wrapper for the Data::Stag modules
17
18 feeds in files into a parser object that generates nestarray events,
19 and feeds the events into a handler/writer class
20
22 -p|parser FORMAT
23 FORMAT is one of xml, sxpr or itext, or the name of a perl module
24
25 this is the class that parsers the input file(s) and generates stag
26 events
27
28 xml assumed as default
29
30 -w|writer FORMAT
31 FORMAT is one of xml, sxpr or itext, or the name of a perl module
32
33 this is the class that catches the events thrown by the parser; it
34 can be any class, but the class is typically a writer
35
36 xml assumed as default
37
38 -o|out FILE
39 the writer will use this file (defaults to STDOUT)
40
41 -e|errf FILE
42 file to store parse error handler output
43
44 -errhandler FORMAT/MODULE
45 FORMAT is one of xml, sxpr or itext, or the name of a perl module
46
47 all parse error events go to this module
48
49
50 -r|root NODE_NAME
51 if this is specified, NODE_NAME becomes the root of the stag tree,
52 and anything that was previously the root is placed below this.
53
54 this happens automatically if more than one file is parsed (because
55 there can only be one tree root)
56
57 -color
58 Works only if the output handler is able to provide ASCII-colors
59 (currently supported for itext and xml)
60
62 Data::Stag
63
64 This script is a wrapper for the method
65
66 Data::Stag->parse()
67
69 Hey! The above document had some coding errors, which are explained
70 below:
71
72 Around line 152:
73 Expected text after =item, not a bullet
74
75
76
77perl v5.30.0 2019-07-26 STAG-PARSE(1)