Cheshire3 Object Model - Parser¶
API¶
- class cheshire3.baseObjects.Parser(session, config, parent=None)[source]¶
A Parser takes a Document and parses it to a Record.
Parsers could be viewed as Record Factories. They take a Document containing some data and produce the equivalent Record.
Often a simple wrapper around an XML parser, however implementations also exist for various types of RDF data.
Implementations¶
The following implementations are included in the distribution by default:
- class cheshire3.parser.MinidomParser(session, config, parent=None)[source]¶
Use default Python Minidom implementation to parse document.
- class cheshire3.parser.SaxParser(session, config, parent)[source]¶
Default SAX based parser. Creates SaxRecord.
- class cheshire3.parser.LxmlParser(session, config, parent)[source]¶
lxml based Parser. Creates LxmlRecords
- class cheshire3.parser.LxmlHtmlParser(session, config, parent)[source]¶
lxml based parser for HTML documents.