Home | Trees | Indices | Help |
|
---|
|
Classes | |
ParseError Exception raised when fatal syntax errors are found in the input being parsed. |
|
XMLParser Generator-based XML parser based on roughly equivalent code in Kid/ElementTree. |
|
HTMLParser Parser for HTML input based on the Python HTMLParser module. |
Functions | |||
|
|||
|
|||
|
Function Details |
|
Parse the given XML source and return a markup stream. Unlike with XMLParser, the returned stream is reusable, meaning it can be iterated over multiple times: >>> xml = XML('<doc><elem>Foo</elem><elem>Bar</elem></doc>') >>> print(xml) <doc><elem>Foo</elem><elem>Bar</elem></doc> >>> print(xml.select('elem')) <elem>Foo</elem><elem>Bar</elem> >>> print(xml.select('elem/text()')) FooBar
|
Parse the given HTML source and return a markup stream. Unlike with HTMLParser, the returned stream is reusable, meaning it can be iterated over multiple times: >>> html = HTML('<body><h1>Foo</h1></body>') >>> print(html) <body><h1>Foo</h1></body> >>> print(html.select('h1')) <h1>Foo</h1> >>> print(html.select('h1/text()')) Foo
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Apr 22 14:10:35 2010 | http://epydoc.sourceforge.net |