Stephan Michels describes Chaperon [1] as a project that converts structured text to XML. The project contains two ANT tasks to create the parse table and to parse text documents. There are also Generator/Transformer componenets for Apache Cocoon 2.
[1] http://chaperon.sourceforge.net