blob: 547adbf6fdf67bb3ca6b2b81a86456b4ea6059b6 [file] [log] [blame]
Tor Norbye3a2425a2013-11-04 10:16:08 -08001# $Id: pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $
2# Author: David Goodger <goodger@python.org>
3# Copyright: This module has been placed in the public domain.
4
5"""
6Simple internal document tree Writer, writes indented pseudo-XML.
7"""
8
9__docformat__ = 'reStructuredText'
10
11
12from docutils import writers
13
14
15class Writer(writers.Writer):
16
17 supported = ('pprint', 'pformat', 'pseudoxml')
18 """Formats this writer supports."""
19
20 config_section = 'pseudoxml writer'
21 config_section_dependencies = ('writers',)
22
23 output = None
24 """Final translated form of `document`."""
25
26 def translate(self):
27 self.output = self.document.pformat()
28
29 def supports(self, format):
30 """This writer supports all format-specific elements."""
31 return 1