1XMLPRETTY(1)          User Contributed Perl Documentation         XMLPRETTY(1)
2
3
4

NAME

6       xmlpretty - XML pretty printer
7

SYNOPSIS

9         xmlpretty [--options] [filename]
10

DESCRIPTION

12       xmlpretty is the commandline interface to XML::Handler::YAWriter,
13       acting as a tool to add and remove pretty printing to XML files.
14
15       xmlpretty has several methods to add human readablitiy.
16
17       If you want to add readablity without adding so-called ignorable
18       whitespace, use it in the following way :
19
20         $ xmlpretty --AddHiddenNewline \
21                     --AddHiddenAttrTab \
22                 --CatchEmptyElement \
23                 uglyfile.xml > prettyfile.xml
24
25       If you do not want to process the file further, but only want it human
26       readable, add visible whitespace to the file as follows :
27
28         $ xmlpretty --PrettyWhiteNewline \
29                     --PrettyWhiteIndent \
30                 --CatchEmptyElement \
31                 uglyfile.xml > prettyfile.xml
32
33       You may use YAWriter to clean whitespace from XML documents.  This may
34       work in 99% of the cases where you want to get rid of ignorable
35       whitespace caused by the various forms of pretty printing.
36
37         $ xmlpretty --NoWhiteSpace \
38                     --NoComments \
39                     --AddHiddenNewline \
40                 --AddHiddenAttrTab \
41                 --CatchEmptyElement \
42                 prettyfile.xml > cleanfile.xml
43
44   Options
45       Options are given in a gnu like --option idiom.
46
47       AddHiddenNewline boolean
48           Add hidden newline before ">"
49
50       AddHiddenAttrTab boolean
51           Add hidden tabulation for attributes
52
53       CatchEmptyElement boolean
54           Catch empty Elements, apply "/>" compression
55
56       CatchWhiteSpace boolean
57           Catch whitespace with comments
58
59       IsSGML boolean
60           This option will cause start_document, processing_instruction and
61           doctype_decl to appear as SGML. The SGML is still well-formed of
62           course, if your SAX events are well-formed.
63
64       NoComments boolean
65           Supress Comments
66
67       NoDTD boolean
68           Supress DTD
69
70       NoPI boolean
71           Supress Processing Instructions
72
73       NoProlog boolean
74           Supress <?xml ... ?> Prolog
75
76       NoWhiteSpace boolean
77           Supress WhiteSpace to clean documents from prior pretty printing.
78
79       PrettyWhiteIndent boolean
80           Add visible indent before any eventstring
81
82       PrettyWhiteNewline boolean
83           Add visible newlines before any eventstring
84
85       SAX1 boolean (not yet implemented)
86           Output only SAX1 compilant eventstrings
87
88   Bugs:
89       Automatic recoding between 8bit and 16bit does not yet work correctly !
90
91       I have Perl-5.6 at home and here I can specify "use utf8;" in the right
92       places to make recoding work. But I dislike saying "use 5.00555;"
93       because many systems run 5.00503.
94

AUTHOR

96       Michael Koehne, Kraehe@Copyleft.De
97

Thanks

99       "Derksen, Eduard (Enno), CSCIO" <enno@att.com> helped me with the
100       Escape hash and gave quite a lot of usefull comments.
101

SEE ALSO

103       perl and XML::Parser::PerlSAX
104
105
106
107perl v5.28.0                      2000-06-20                      XMLPRETTY(1)
Impressum