Package openid :: Package consumer :: Module html_parse
[frames | no frames]

Module openid.consumer.html_parse

This module implements a VERY limited parser that finds <link> tags in the head of HTML or XHTML documents and parses out their attributes according to the OpenID spec. It is a liberal parser, but it requires these things from the data in order to work: From http://openid.net/specs.bml#linkrel:

The parser ignores SGML comments and <![CDATA[blocks]]>. Both kinds of quoting are allowed for attributes.

The parser deals with invalid markup in these ways:
Function Summary
[[(type(html), type(html))]] parseLinkAttrs(html)
Find all link tags in a string representing a HTML document and return a list of their attributes.

Function Details

parseLinkAttrs(html)

Find all link tags in a string representing a HTML document and return a list of their attributes.
Parameters:
html - the text to parse
           (type=str or unicode)
Returns:
A list of dictionaries of attributes, one for each link tag
           (type=[[(type(html), type(html))]])

Generated by Epydoc 2.1 on Wed Nov 14 17:47:20 2007 http://epydoc.sf.net