本文整理汇总了Python中handler.DTDHandler方法的典型用法代码示例。如果您正苦于以下问题:Python handler.DTDHandler方法的具体用法?Python handler.DTDHandler怎么用?Python handler.DTDHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类handler
的用法示例。
在下文中一共展示了handler.DTDHandler方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import handler [as 别名]
# 或者: from handler import DTDHandler [as 别名]
def __init__(self):
self._cont_handler = handler.ContentHandler()
self._dtd_handler = handler.DTDHandler()
self._ent_handler = handler.EntityResolver()
self._err_handler = handler.ErrorHandler()
示例2: externalEntityDecl
# 需要导入模块: import handler [as 别名]
# 或者: from handler import DTDHandler [as 别名]
def externalEntityDecl(self, name, public_id, system_id):
"""Report a parsed entity declaration. (Unparsed entities are
reported to the DTDHandler.)
Only the first declaration for each entity will be reported.
name is the name of the entity. If it is a parameter entity,
the name will begin with '%'. public_id and system_id are the
public and system identifiers of the entity. public_id will be
None if none were declared."""
# ===== LEXICALHANDLER =====
示例3: __init__
# 需要导入模块: import handler [as 别名]
# 或者: from handler import DTDHandler [as 别名]
def __init__(self):
self.doc_handler = DocumentHandler()
self.dtd_handler = DTDHandler()
self.ent_handler = EntityResolver()
self.err_handler = ErrorHandler()
示例4: skippedEntity
# 需要导入模块: import handler [as 别名]
# 或者: from handler import DTDHandler [as 别名]
def skippedEntity(self, name):
self._cont_handler.skippedEntity(name)
# DTDHandler methods