diff options
Diffstat (limited to 'docutils/writers/pseudoxml.py')
-rw-r--r-- | docutils/writers/pseudoxml.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docutils/writers/pseudoxml.py b/docutils/writers/pseudoxml.py new file mode 100644 index 000000000..c0e18bffb --- /dev/null +++ b/docutils/writers/pseudoxml.py @@ -0,0 +1,33 @@ +# Authors: David Goodger +# Contact: goodger@users.sourceforge.net +# Revision: $Revision$ +# Date: $Date$ +# Copyright: This module has been placed in the public domain. + +""" +Simple internal document tree Writer, writes indented pseudo-XML. +""" + +__docformat__ = 'reStructuredText' + + +from docutils import writers + + +class Writer(writers.Writer): + + supported = ('pprint', 'pformat', 'pseudoxml') + """Formats this writer supports.""" + + config_section = 'pseudoxml writer' + config_section_dependencies = ('writers',) + + output = None + """Final translated form of `document`.""" + + def translate(self): + self.output = self.document.pformat() + + def supports(self, format): + """This writer supports all format-specific elements.""" + return 1 |