4Suite™ API Documentation

# ► Module Ft.Xml.Lib.XmlPrettyPrinter

This module supports formatted document serialization in XML syntax.
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/

Classes: XmlPrettyPrinter

## Classes

class XmlPrettyPrinter(Ft.Xml.Lib.XmlPrinter.XmlPrinter)
An XmlPrettyPrinter instance provides functions for serializing an XML or XML-like document to a stream, based on SAX-like event calls initiated by an Ft.Xml.Lib.Print.PrintVisitor instance.
The methods in this subclass of XmlPrinter produce the same output
as the base class, but with extra whitespace added for visual
formatting. The indent attribute is the string used for each level
of indenting. It defaults to 2 spaces.

### Methods

__init__(self, stream, encoding)
cdataSection(self, data)
comment(self, data)
endElement(self, namespaceUri, tagName)
processingInstruction(self, target, data)
startElement(self, namespaceUri, tagName, namespaces, attributes)
text(self, data, disableEscaping=0)

### Methods inherited from class Ft.Xml.Lib.XmlPrinter.XmlPrinter

attribute, doctype, endDocument, startDocument

### Fields

indent = ' '

### Fields