xml-prettify: Pretty print XML.

[ bsd3, library, program, text ] [ Propose Tags ] [ Report a vulnerability ]

A simple command-line XML pretty-printer which automatically handles indentation.


[Skip to Readme]

Modules

  • Text
    • XML
      • Text.XML.Prettify

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.1
Dependencies base (>=4 && <=5), cmdargs, unix (>=2.4) [details]
Tested with ghc ==6.12.2
License BSD-3-Clause
Author David M. Rosenberg
Maintainer dmr@davidrosenberg.me
Category Text
Home page http://github.com/rosenbergdm/xml-prettify
Uploaded by DavidRosenberg at 2010-06-24T11:11:22Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables xml-prettify
Downloads 1078 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-29 [all 8 reports]

Readme for xml-prettify-0.1.0.1

[back to package description]

xml-prettify

A pretty printer / indentation tool for generic XML.

Installation

There are no prerequisites other than GHC (>=6.10).

  1. Using cabal-install

    $ cabal install xml-prettify

  2. From source archive

    $ tar xzvf xml-prettify-0.0.1.tar.gz

    $ cd xml-prettify-0.0.1

    $ ghc --make Setup.hs

    $ ./Setup configure

    $ ./Setup build

    $ ./Setup install

Usage

$ cat ugly.xml
<Configuration><UPnP><UDN><MediaRenderer>6c36e3a3-xxxx=4e1c-ac5f-506e515f0491</MediaRenderer></UDN><MythFronten><DefaultBackend><DBHostName>localhost</DBHostName><DBUserName>mythtv</DBUserName><DBPassword>xxxxxxx</DBPassword><DBName>mythconverg</DBName><DBPort>0</DBPort></DefaultBackend></MythFrontend></UPnP></Configuration>
$ xml-prettify ugly.xml
<Configuration>
  <UPnP>
    <UDN>
      <MediaRenderer>
        6c36e3a3-xxxx=4e1c-ac5f-506e515f0491
      </MediaRenderer>
    </UDN>
    <MythFronten>
      <DefaultBackend>
        <DBHostName>
          localhost
        </DBHostName>
        <DBUserName>
          mythtv
        </DBUserName>
        <DBPassword>
          xxxxxxx
        </DBPassword>
        <DBName>
          mythconverg
        </DBName>
        <DBPort>
          0
        </DBPort>
      </DefaultBackend>
    </MythFrontend>
  </UPnP>
</Configuration>

Contact

For questions, comments and patches, email me at dmr@davidrosenberg.me.