XHTMLSerializer


Attributes

a decl

True

a encoding

'utf-8'

a formatted

False

a empty_elements

set(['img', 'area', 'basefont', 'frame', 'isindex', 'meta', 'param', 'hr', 'base', 'link', 'br', 'input', 'col'])

a formatted_elements

set(['pre', 'code', 'textarea', 'script', 'kbd', 'math'])

a src_encoding

'utf-8'

a format

Format(simple_newlines=True)

a inline_elements

set(['em', 'code', 'kbd', 'font', 'select', 'span', 'sub', 'img', 'bdo', 'label', 'basefont', 'dfn', 'sup', 'strike', 'input', 'samp', 'cite', 'acronym', 'big', 'var', 'abbr', 'br', 'strong', 'a', 'b', 'textarea', 'i', 'q', 's', 'u', 'small', 'tt'])

a namespaces

{'http://purl.org/atom/ns#': 'atom',
 'http://purl.org/rss/1.0/': 'rss',
 'http://www.w3.org/1999/02/22-rdf-syntax-ns#': 'rdf',
 'http://www.w3.org/1999/xhtml': 'html',
 'http://www.w3.org/XML/1998/namespace': 'xml'}

a doctype

('html',
 '-//W3C//DTD XHTML 1.0 Transitional//EN',
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd')

a inject_type

True

a inline

False

a entity_map

None

Methods

f __init__(self, encoding='utf-8', decl=None, doctype=None, inject_type=None, entity_map=None, namespaces=None, format=None) ...

Initialize XHTMLSerializer.

See the source for more information.