Python Paste


htmlserialize


Attributes

a html_transform

<etree.XSLT object at 0xb771d41c>

a pretty_html_transform

<etree.XSLT object at 0xb771d4dc>

a pretty_html_xsl

'\n<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\n  <xsl:output method="html" indent="yes" />\n  <xsl:template match="/">\n    <xsl:copy-of select="."/>\n  </xsl:template>\n</xsl:transform>\n'

a html_xsl

'\n<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\n  <xsl:output method="html" encoding="UTF-8" />\n  <xsl:template match="/">\n    <xsl:copy-of select="."/>\n  </xsl:template>\n</xsl:transform>\n'

Functions

f tostring(doc, pretty=False) ...

return HTML string representation of the document given

note: this will create a meta http-equiv="Content" tag in the head and may replace any that are present

f decodeAndParseHTML(text) ...

if an html meta tag specifying a charset can be matched, decode the text to a python unicode string before parsing

XXX - this is disabled and in camelCase for no good reason

See the source for more information.