( git://dome.circumlunar.space/~katolaz/xml2tsv/README.md )
( commit e45f9c38cbcc4c544f0107d1abc79f4e1e039413 )

xml2tsv
=======

This is a simple xml-to-tsv converter written in C and based on the
xmlparser library by Hiltjo Posthuma.

The filter reads an XML file from stdin and writes a
tab-separated-values file on stdout. For instance, the XML content
below:

   <!DOCTYPE html>
   <html>
   <head>
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1">

       <!-- FOR THE CURIOUS: This site was made by @thebarrytone. Don't tell my mom. -->

       <title>Motherfucking Website</title>
   </head>

   <body>
       <header>
           <h1>This is a motherfucking website.</h1>
           <aside>And it's fucking perfect.</aside>
       </header>
   </body>
   </html>

is transformed in the following lines:

   /html
   /html/head
   /html/head/meta charset=utf-8
   /html/head
   /html/head/meta name=viewport   content=width=device-width, initial-scale=1
   /html/head          \n              \n
   /html/head/title        Motherfucking Website
   /html/body
   /html/body/header
   /html/body/header/h1    This is a motherfucking website.
   /html/body/header/aside And it's fucking perfect.

Customisation
=============

It is possible to customise several aspects of the output by changing
values in `config.h`. Please see the comments within that file or read
the manpage for more details.

Copying
=======

`xml2tsv` is (c) 2020 by Vincenzo "KatolaZ" Nicosia. It can be used,
distributed, modified, and redistributed under the terms of the ISC
License. See the file LICENSE for more details.