.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 >0, 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "XMLPRETTY 1p" .TH XMLPRETTY 1p "2018-05-06" "perl v5.26.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" xmlpretty \- XML pretty printer .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& xmlpretty [\-\-options] [filename] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBxmlpretty\fR is the commandline interface to XML::Handler::YAWriter, acting as a tool to add and remove pretty printing to \s-1XML\s0 files. .PP \&\fBxmlpretty\fR has several methods to add human readablitiy. .PP If you want to add readablity without adding so-called \fIignorable whitespace\fR, use it in the following way : .PP .Vb 4 \& $ xmlpretty \-\-AddHiddenNewline \e \& \-\-AddHiddenAttrTab \e \& \-\-CatchEmptyElement \e \& uglyfile.xml > prettyfile.xml .Ve .PP If you do \fBnot\fR want to process the file further, but only want it human readable, add visible whitespace to the file as follows : .PP .Vb 4 \& $ xmlpretty \-\-PrettyWhiteNewline \e \& \-\-PrettyWhiteIndent \e \& \-\-CatchEmptyElement \e \& uglyfile.xml > prettyfile.xml .Ve .PP You may use YAWriter to clean whitespace from \s-1XML\s0 documents. This may work in 99% of the cases where you want to get rid of ignorable whitespace caused by the various forms of pretty printing. .PP .Vb 6 \& $ xmlpretty \-\-NoWhiteSpace \e \& \-\-NoComments \e \& \-\-AddHiddenNewline \e \& \-\-AddHiddenAttrTab \e \& \-\-CatchEmptyElement \e \& prettyfile.xml > cleanfile.xml .Ve .SS "Options" .IX Subsection "Options" Options are given in a gnu like \-\-option idiom. .IP "AddHiddenNewline boolean" 4 .IX Item "AddHiddenNewline boolean" Add hidden newline before \*(L">\*(R" .IP "AddHiddenAttrTab boolean" 4 .IX Item "AddHiddenAttrTab boolean" Add hidden tabulation for attributes .IP "CatchEmptyElement boolean" 4 .IX Item "CatchEmptyElement boolean" Catch empty Elements, apply \*(L"/>\*(R" compression .IP "CatchWhiteSpace boolean" 4 .IX Item "CatchWhiteSpace boolean" Catch whitespace with comments .IP "IsSGML boolean" 4 .IX Item "IsSGML boolean" This option will cause start_document, processing_instruction and doctype_decl to appear as \s-1SGML.\s0 The \s-1SGML\s0 is still well-formed of course, if your \s-1SAX\s0 events are well-formed. .IP "NoComments boolean" 4 .IX Item "NoComments boolean" Supress Comments .IP "NoDTD boolean" 4 .IX Item "NoDTD boolean" Supress \s-1DTD\s0 .IP "NoPI boolean" 4 .IX Item "NoPI boolean" Supress Processing Instructions .IP "NoProlog boolean" 4 .IX Item "NoProlog boolean" Supress Prolog .IP "NoWhiteSpace boolean" 4 .IX Item "NoWhiteSpace boolean" Supress WhiteSpace to clean documents from prior pretty printing. .IP "PrettyWhiteIndent boolean" 4 .IX Item "PrettyWhiteIndent boolean" Add visible indent before any eventstring .IP "PrettyWhiteNewline boolean" 4 .IX Item "PrettyWhiteNewline boolean" Add visible newlines before any eventstring .IP "\s-1SAX1\s0 boolean (not yet implemented)" 4 .IX Item "SAX1 boolean (not yet implemented)" Output only \s-1SAX1\s0 compilant eventstrings .SS "Bugs:" .IX Subsection "Bugs:" Automatic recoding between 8bit and 16bit does not yet work correctly ! .PP I have Perl\-5.6 at home and here I can specify \*(L"use utf8;\*(R" in the right places to make recoding work. But I dislike saying \*(L"use 5.00555;\*(R" because many systems run 5.00503. .SH "AUTHOR" .IX Header "AUTHOR" Michael Koehne, Kraehe@Copyleft.De .SH "Thanks" .IX Header "Thanks" \&\*(L"Derksen, Eduard (Enno), \s-1CSCIO\*(R"\s0 helped me with the Escape hash and gave quite a lot of useful comments. .SH "SEE ALSO" .IX Header "SEE ALSO" perl and XML::Parser::PerlSAX