Parsing and Compiling XML¶
Parse XML and compile to TALInterpreter
intermediate code,
using a TALGenerator
.
-
class
zope.tal.talparser.
TALParser
(gen=None, encoding=None)[source]¶ Bases:
zope.tal.xmlparser.XMLParser
Parser for XML.
After parsing with
parseFile()
,parseString()
,parseURL()
orparseStream()
, you can callgetCode()
to retrieve the parsed program and macros.Parameters: gen (TALGenerator) – The configured (with an expression compiler) code generator to use. If one is not given, a default will be used.
-
class
zope.tal.xmlparser.
XMLParser
(encoding=None)[source]¶ Bases:
object
Parse XML using
xml.parsers.expat
.