mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
[stdlib][xml] Initial typestubs for xml.dom (#3852)
This commit is contained in:
20
stdlib/2and3/xml/dom/NodeFilter.pyi
Normal file
20
stdlib/2and3/xml/dom/NodeFilter.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
class NodeFilter:
|
||||
FILTER_ACCEPT: int
|
||||
FILTER_REJECT: int
|
||||
FILTER_SKIP: int
|
||||
|
||||
SHOW_ALL: int
|
||||
SHOW_ELEMENT: int
|
||||
SHOW_ATTRIBUTE: int
|
||||
SHOW_TEXT: int
|
||||
SHOW_CDATA_SECTION: int
|
||||
SHOW_ENTITY_REFERENCE: int
|
||||
SHOW_ENTITY: int
|
||||
SHOW_PROCESSING_INSTRUCTION: int
|
||||
SHOW_COMMENT: int
|
||||
SHOW_DOCUMENT: int
|
||||
SHOW_DOCUMENT_TYPE: int
|
||||
SHOW_DOCUMENT_FRAGMENT: int
|
||||
SHOW_NOTATION: int
|
||||
|
||||
def acceptNode(self, node) -> int: ...
|
||||
67
stdlib/2and3/xml/dom/__init__.pyi
Normal file
67
stdlib/2and3/xml/dom/__init__.pyi
Normal file
@@ -0,0 +1,67 @@
|
||||
class Node:
|
||||
ELEMENT_NODE: int
|
||||
ATTRIBUTE_NODE: int
|
||||
TEXT_NODE: int
|
||||
CDATA_SECTION_NODE: int
|
||||
ENTITY_REFERENCE_NODE: int
|
||||
ENTITY_NODE: int
|
||||
PROCESSING_INSTRUCTION_NODE: int
|
||||
COMMENT_NODE: int
|
||||
DOCUMENT_NODE: int
|
||||
DOCUMENT_TYPE_NODE: int
|
||||
DOCUMENT_FRAGMENT_NODE: int
|
||||
NOTATION_NODE: int
|
||||
|
||||
|
||||
# ExceptionCode
|
||||
INDEX_SIZE_ERR: int
|
||||
DOMSTRING_SIZE_ERR: int
|
||||
HIERARCHY_REQUEST_ERR: int
|
||||
WRONG_DOCUMENT_ERR: int
|
||||
INVALID_CHARACTER_ERR: int
|
||||
NO_DATA_ALLOWED_ERR: int
|
||||
NO_MODIFICATION_ALLOWED_ERR: int
|
||||
NOT_FOUND_ERR: int
|
||||
NOT_SUPPORTED_ERR: int
|
||||
INUSE_ATTRIBUTE_ERR: int
|
||||
INVALID_STATE_ERR: int
|
||||
SYNTAX_ERR: int
|
||||
INVALID_MODIFICATION_ERR: int
|
||||
NAMESPACE_ERR: int
|
||||
INVALID_ACCESS_ERR: int
|
||||
VALIDATION_ERR: int
|
||||
|
||||
|
||||
class DOMException(Exception):
|
||||
code: int
|
||||
|
||||
def __init__(self, *args, **kw) -> None: ...
|
||||
def _get_code(self) -> int: ...
|
||||
|
||||
class IndexSizeErr(DOMException): ...
|
||||
class DomstringSizeErr(DOMException): ...
|
||||
class HierarchyRequestErr(DOMException): ...
|
||||
class WrongDocumentErr(DOMException): ...
|
||||
class NoDataAllowedErr(DOMException): ...
|
||||
class NoModificationAllowedErr(DOMException): ...
|
||||
class NotFoundErr(DOMException): ...
|
||||
class NotSupportedErr(DOMException): ...
|
||||
class InuseAttributeErr(DOMException): ...
|
||||
class InvalidStateErr(DOMException): ...
|
||||
class SyntaxErr(DOMException): ...
|
||||
class InvalidModificationErr(DOMException): ...
|
||||
class NamespaceErr(DOMException): ...
|
||||
class InvalidAccessErr(DOMException): ...
|
||||
class ValidationErr(DOMException): ...
|
||||
|
||||
class UserDataHandler:
|
||||
NODE_CLONED: int
|
||||
NODE_IMPORTED: int
|
||||
NODE_DELETED: int
|
||||
NODE_RENAMED: int
|
||||
|
||||
XML_NAMESPACE: str
|
||||
XMLNS_NAMESPACE: str
|
||||
XHTML_NAMESPACE: str
|
||||
EMPTY_NAMESPACE: None
|
||||
EMPTY_PREFIX: None
|
||||
Reference in New Issue
Block a user