Prexml and postxml manual


prexml postxml - nroff processors to build xml files.


@BINDIR@/prexml < file.tr | nroff -mux | @BINDIR@/postxml > file.xml


Postxml provide a solution to build an xml file from a troff document that rely on nroff itself. Since nroff build a plain text file from a troff document, it can be used, with an appropriate macro, to produce an intermediate file that postxml will translate to xml.

That intermediate file contain tags that postxml will transform to xml tags. If these tags are present in the source file, and need to be printed as is, prexml simply escape these tags so that postxml won’t substitute them.

Since the final xml file might contain utf-8 characters, the -Tlocale option of nroff must be used.

prexml and postxml are provided with the ux macro that insert tags in an utmac document.

So, the command line could be :

prexml < file.tr | nroff -Tlocale \
-mux | postxml > file.xml



Postxml will substitute the following tags.

So the following text :

Some text
note text

Will be transform in :

Some text<a>note text</a> &lt;.


All these tags will be escaped by prexml if they are present in the original file, following these rules :


@BINDIR@/prexml @BINDIR@/postxml

See also

nroff(1) , trxtr(1).


Prexml, postxml and this man page are distributed under a two clause BSD license.

Help and bugs

Don’t hesitate to ask questions at help at utroff dot org. Please, send bugs and patches at help at utroff dot org.


Written by Pierre-Jean Fichet.