1STAG-FLATTEN(1)       User Contributed Perl Documentation      STAG-FLATTEN(1)
2
3
4

NAME

6       stag-flatten - turns stag data into a flat table
7

SYNOPSIS

9         stag-flatten -c name -c person/name dept MyFile.xml
10

DESCRIPTION

12       reads in a file in a stag format, and 'flattens' it to a tab-delimited
13       table format. given this data:
14
15         (company
16          (dept
17           (name "special-operations")
18           (person
19            (name "james-bond"))
20           (person
21            (name "fred"))))
22
23       the above command will return a two column table
24
25         special-operations      james-bond
26         special-operations      fred
27
28       If there are multiple values for the columns within the node, then the
29       cartesian product will be calculated
30

USAGE

32         stag-flatten [-p PARSER] [-c COLS] [-c COLS] NODE <file>
33

ARGUMENTS

35       -p|parser FORMAT
36           FORMAT is one of xml, sxpr or itext
37
38           xml assumed as default
39
40       -c|column COL1,COL2,COL3,..
41           the name of the columns/elements to write out
42
43           this can be specified either with multiple -c arguments, or with a
44           comma-seperated (no spaces) list of column (terminal node) names
45           after a single -c
46
47       -n|nest
48           if set, then the output will be a compress repeating values into
49           the same row; each cell in the table will be enclosed by {}, and
50           will contain a comma-delimited set of values
51

SEE ALSO

53       Data::Stag
54
55
56
57perl v5.30.1                      2020-01-29                   STAG-FLATTEN(1)
Impressum