本文整理匯總了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