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

NAME

6       stag-splitter - splits a stag file into multiple files
7

SYNOPSIS

9         stag-splitter -split person -name social_security_no file.xml
10

DESCRIPTION

12       Splits a file using a user specified parser (default xml) around a
13       specified split node, naming each file according to the name argument
14
15       the files will be named anonymously, unless the '-name' switch is
16       specified; this will use the value of the specified element as the
17       filename
18
19       eg; if we have
20
21         <top>
22           <a>
23             <b>foo</b>
24             <c>yah</c>
25             <d>
26               <e>xxx</e>
27             </d>
28           </a>
29           <a>
30             <b>bar</b>
31             <d>
32               <e>wibble</e>
33             </d>
34           </a>
35         </top>
36
37       if we run
38
39         stag-splitter -split a -name b
40
41       it will generate two files, "foo.xml" and "bar.xml"
42
43       input format can be 'xml', 'sxpr' or 'itext' - if this is left blank
44       the format will be guessed from the file suffix
45
46       the output format defaults to the same as the input format, but another
47       can be chosen.
48
49       files go in the current directory, but this can be overridden with the
50       '-dir' switch
51

USAGE

53          stag-splitter [-split <ELEMENT-NAME>] [-name <ELEMENT-NAME>] [-dir <DIR>] [-format <INPUT-FORMAT>] [-outformat <OUTPUT-FORMAT>] <FILENAMES>
54
55       -p|parser FORMAT
56           FORMAT is one of xml, sxpr or itext, or the name of a perl module
57
58           xml assumed as default
59
60       -w|writer FORMAT
61           FORMAT is one of xml, sxpr or itext, or the name of a perl module
62
63       -split|s NODE
64           node to split on
65
66       -name|n NODE
67           field/element to use when naming files
68
69           will use surrogate IDs if this argument not specified
70
71       -dir|d DIR
72           write files to this directory
73
74
75
76perl v5.30.1                      2020-01-29                  STAG-SPLITTER(1)
Impressum