4Suite™ API Documentation

# ► Module Ft.Xml.Lib.HtmlPrettyPrinter

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

Classes: HtmlPrettyPrinter |  |  |  | Fields: EMPTY_NAMESPACE

## Classes

class HtmlPrettyPrinter(Ft.Xml.Lib.HtmlPrinter.HtmlPrinter)
An HtmlPrettyPrinter 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 HtmlPrinter attempt to emit a
document conformant to the HTML 4.01 syntax, 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)
comment(self, data)
endElement(self, namespaceUri, tagName)
processingInstruction(self, target, data)
startElement(self, namespaceUri, tagName, namespaces, attributes)

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

attribute, doctype, startDocument, text

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

cdataSection, endDocument

### Fields

indent = ' '
inlineElements = {(None, 'a'): True, (None, 'abbr'): True, (None, 'acronym'): True, (None, 'applet'): True, (None, 'b'): True, (None, 'basefont'): True, (None, 'bdo'): True, (None, 'big'): True, (None, 'button'): True, (None, 'cite'): True, ...}
noIndentElements = {(None, 'pre'): True, (None, 'script'): True, (None, 'style'): True, (None, 'textarea'): True, (None, 'xmp'): True}

### Fields

EMPTY_NAMESPACE = None