QtXml.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. # The PEP 484 type hints stub file for the QtXml module.
  2. #
  3. # Generated by SIP 6.15.3
  4. #
  5. # Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. #
  7. # This file is part of PyQt6.
  8. #
  9. # This file may be used under the terms of the GNU General Public License
  10. # version 3.0 as published by the Free Software Foundation and appearing in
  11. # the file LICENSE included in the packaging of this file. Please review the
  12. # following information to ensure the GNU General Public License version 3.0
  13. # requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. #
  15. # If you do not wish to use this file under the terms of the GPL version 3.0
  16. # then you may purchase a commercial license. For more information contact
  17. # info@riverbankcomputing.com.
  18. #
  19. # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. import collections, re, typing, enum
  22. try:
  23. from warnings import deprecated
  24. except ImportError:
  25. pass
  26. import PyQt6.sip
  27. from PyQt6 import QtCore
  28. # Support for QDate, QDateTime and QTime.
  29. import datetime
  30. # Convenient type aliases.
  31. PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
  32. PYQT_SLOT = typing.Union[collections.abc.Callable[..., Any], QtCore.pyqtBoundSignal]
  33. class QDomImplementation(PyQt6.sip.simplewrapper):
  34. class InvalidDataPolicy(enum.Enum):
  35. AcceptInvalidChars = ... # type: QDomImplementation.InvalidDataPolicy
  36. DropInvalidChars = ... # type: QDomImplementation.InvalidDataPolicy
  37. ReturnNullNode = ... # type: QDomImplementation.InvalidDataPolicy
  38. @typing.overload
  39. def __init__(self) -> None: ...
  40. @typing.overload
  41. def __init__(self, a0: 'QDomImplementation') -> None: ...
  42. def isNull(self) -> bool: ...
  43. @staticmethod
  44. def setInvalidDataPolicy(policy: 'QDomImplementation.InvalidDataPolicy') -> None: ...
  45. @staticmethod
  46. def invalidDataPolicy() -> 'QDomImplementation.InvalidDataPolicy': ...
  47. def createDocument(self, nsURI: str|None, qName: str|None, doctype: 'QDomDocumentType') -> 'QDomDocument': ...
  48. def createDocumentType(self, qName: str|None, publicId: str|None, systemId: str|None) -> 'QDomDocumentType': ...
  49. def hasFeature(self, feature: str|None, version: str|None) -> bool: ...
  50. def __ne__(self, other: object): ...
  51. def __eq__(self, other: object): ...
  52. class QDomNode(PyQt6.sip.simplewrapper):
  53. class EncodingPolicy(enum.Enum):
  54. EncodingFromDocument = ... # type: QDomNode.EncodingPolicy
  55. EncodingFromTextStream = ... # type: QDomNode.EncodingPolicy
  56. class NodeType(enum.Enum):
  57. ElementNode = ... # type: QDomNode.NodeType
  58. AttributeNode = ... # type: QDomNode.NodeType
  59. TextNode = ... # type: QDomNode.NodeType
  60. CDATASectionNode = ... # type: QDomNode.NodeType
  61. EntityReferenceNode = ... # type: QDomNode.NodeType
  62. EntityNode = ... # type: QDomNode.NodeType
  63. ProcessingInstructionNode = ... # type: QDomNode.NodeType
  64. CommentNode = ... # type: QDomNode.NodeType
  65. DocumentNode = ... # type: QDomNode.NodeType
  66. DocumentTypeNode = ... # type: QDomNode.NodeType
  67. DocumentFragmentNode = ... # type: QDomNode.NodeType
  68. NotationNode = ... # type: QDomNode.NodeType
  69. BaseNode = ... # type: QDomNode.NodeType
  70. CharacterDataNode = ... # type: QDomNode.NodeType
  71. @typing.overload
  72. def __init__(self) -> None: ...
  73. @typing.overload
  74. def __init__(self, a0: 'QDomNode') -> None: ...
  75. def columnNumber(self) -> int: ...
  76. def lineNumber(self) -> int: ...
  77. def nextSiblingElement(self, taName: str|None = ..., namespaceURI: str|None = ...) -> 'QDomElement': ...
  78. def previousSiblingElement(self, tagName: str|None = ..., namespaceURI: str|None = ...) -> 'QDomElement': ...
  79. def lastChildElement(self, tagName: str|None = ..., namespaceURI: str|None = ...) -> 'QDomElement': ...
  80. def firstChildElement(self, tagName: str|None = ..., namespaceURI: str|None = ...) -> 'QDomElement': ...
  81. def save(self, a0: QtCore.QTextStream, a1: int, a2: 'QDomNode.EncodingPolicy' = ...) -> None: ...
  82. def toComment(self) -> 'QDomComment': ...
  83. def toCharacterData(self) -> 'QDomCharacterData': ...
  84. def toProcessingInstruction(self) -> 'QDomProcessingInstruction': ...
  85. def toNotation(self) -> 'QDomNotation': ...
  86. def toEntity(self) -> 'QDomEntity': ...
  87. def toText(self) -> 'QDomText': ...
  88. def toEntityReference(self) -> 'QDomEntityReference': ...
  89. def toElement(self) -> 'QDomElement': ...
  90. def toDocumentType(self) -> 'QDomDocumentType': ...
  91. def toDocument(self) -> 'QDomDocument': ...
  92. def toDocumentFragment(self) -> 'QDomDocumentFragment': ...
  93. def toCDATASection(self) -> 'QDomCDATASection': ...
  94. def toAttr(self) -> 'QDomAttr': ...
  95. def clear(self) -> None: ...
  96. def isNull(self) -> bool: ...
  97. def namedItem(self, name: str|None) -> 'QDomNode': ...
  98. def isComment(self) -> bool: ...
  99. def isCharacterData(self) -> bool: ...
  100. def isProcessingInstruction(self) -> bool: ...
  101. def isNotation(self) -> bool: ...
  102. def isEntity(self) -> bool: ...
  103. def isText(self) -> bool: ...
  104. def isEntityReference(self) -> bool: ...
  105. def isElement(self) -> bool: ...
  106. def isDocumentType(self) -> bool: ...
  107. def isDocument(self) -> bool: ...
  108. def isDocumentFragment(self) -> bool: ...
  109. def isCDATASection(self) -> bool: ...
  110. def isAttr(self) -> bool: ...
  111. def setPrefix(self, pre: str|None) -> None: ...
  112. def prefix(self) -> str: ...
  113. def setNodeValue(self, a0: str|None) -> None: ...
  114. def nodeValue(self) -> str: ...
  115. def hasAttributes(self) -> bool: ...
  116. def localName(self) -> str: ...
  117. def namespaceURI(self) -> str: ...
  118. def ownerDocument(self) -> 'QDomDocument': ...
  119. def attributes(self) -> 'QDomNamedNodeMap': ...
  120. def nextSibling(self) -> 'QDomNode': ...
  121. def previousSibling(self) -> 'QDomNode': ...
  122. def lastChild(self) -> 'QDomNode': ...
  123. def firstChild(self) -> 'QDomNode': ...
  124. def childNodes(self) -> 'QDomNodeList': ...
  125. def parentNode(self) -> 'QDomNode': ...
  126. def nodeType(self) -> 'QDomNode.NodeType': ...
  127. def nodeName(self) -> str: ...
  128. def isSupported(self, feature: str|None, version: str|None) -> bool: ...
  129. def normalize(self) -> None: ...
  130. def cloneNode(self, deep: bool = ...) -> 'QDomNode': ...
  131. def hasChildNodes(self) -> bool: ...
  132. def appendChild(self, newChild: 'QDomNode') -> 'QDomNode': ...
  133. def removeChild(self, oldChild: 'QDomNode') -> 'QDomNode': ...
  134. def replaceChild(self, newChild: 'QDomNode', oldChild: 'QDomNode') -> 'QDomNode': ...
  135. def insertAfter(self, newChild: 'QDomNode', refChild: 'QDomNode') -> 'QDomNode': ...
  136. def insertBefore(self, newChild: 'QDomNode', refChild: 'QDomNode') -> 'QDomNode': ...
  137. def __ne__(self, other: object): ...
  138. def __eq__(self, other: object): ...
  139. class QDomNodeList(PyQt6.sip.simplewrapper):
  140. @typing.overload
  141. def __init__(self) -> None: ...
  142. @typing.overload
  143. def __init__(self, a0: 'QDomNodeList') -> None: ...
  144. def __ne__(self, other: object): ...
  145. def __eq__(self, other: object): ...
  146. def isEmpty(self) -> bool: ...
  147. def size(self) -> int: ...
  148. def __len__(self) -> int: ...
  149. def count(self) -> int: ...
  150. def length(self) -> int: ...
  151. def at(self, index: int) -> QDomNode: ...
  152. def item(self, index: int) -> QDomNode: ...
  153. class QDomDocumentType(QDomNode):
  154. @typing.overload
  155. def __init__(self) -> None: ...
  156. @typing.overload
  157. def __init__(self, x: 'QDomDocumentType') -> None: ...
  158. def nodeType(self) -> QDomNode.NodeType: ...
  159. def internalSubset(self) -> str: ...
  160. def systemId(self) -> str: ...
  161. def publicId(self) -> str: ...
  162. def notations(self) -> 'QDomNamedNodeMap': ...
  163. def entities(self) -> 'QDomNamedNodeMap': ...
  164. def name(self) -> str: ...
  165. class QDomDocument(QDomNode):
  166. class ParseOption(enum.Enum):
  167. Default = ... # type: QDomDocument.ParseOption
  168. UseNamespaceProcessing = ... # type: QDomDocument.ParseOption
  169. PreserveSpacingOnlyNodes = ... # type: QDomDocument.ParseOption
  170. @typing.overload
  171. def __init__(self) -> None: ...
  172. @typing.overload
  173. def __init__(self, name: str|None) -> None: ...
  174. @typing.overload
  175. def __init__(self, doctype: QDomDocumentType) -> None: ...
  176. @typing.overload
  177. def __init__(self, x: 'QDomDocument') -> None: ...
  178. def toByteArray(self, indent: int = ...) -> QtCore.QByteArray: ...
  179. def toString(self, indent: int = ...) -> str: ...
  180. @typing.overload
  181. def setContent(self, reader: QtCore.QXmlStreamReader|None, options: 'QDomDocument.ParseOption' = ...) -> tuple[bool, str, int, int]: ...
  182. @typing.overload
  183. def setContent(self, device: QtCore.QIODevice|None, options: 'QDomDocument.ParseOption' = ...) -> tuple[bool, str, int, int]: ...
  184. @typing.overload
  185. def setContent(self, data: QtCore.QByteArray|bytes|bytearray|memoryview|str|None, options: 'QDomDocument.ParseOption' = ...) -> tuple[bool, str, int, int]: ...
  186. @typing.overload
  187. def setContent(self, text: QtCore.QByteArray|bytes|bytearray|memoryview, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ...
  188. @typing.overload
  189. def setContent(self, text: str|None, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ...
  190. @typing.overload
  191. def setContent(self, dev: QtCore.QIODevice|None, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ...
  192. @typing.overload
  193. def setContent(self, reader: QtCore.QXmlStreamReader|None, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ...
  194. def nodeType(self) -> QDomNode.NodeType: ...
  195. def documentElement(self) -> 'QDomElement': ...
  196. def implementation(self) -> QDomImplementation: ...
  197. def doctype(self) -> QDomDocumentType: ...
  198. def elementById(self, elementId: str|None) -> 'QDomElement': ...
  199. def elementsByTagNameNS(self, nsURI: str|None, localName: str|None) -> QDomNodeList: ...
  200. def createAttributeNS(self, nsURI: str|None, qName: str|None) -> 'QDomAttr': ...
  201. def createElementNS(self, nsURI: str|None, qName: str|None) -> 'QDomElement': ...
  202. def importNode(self, importedNode: QDomNode, deep: bool) -> QDomNode: ...
  203. def elementsByTagName(self, tagname: str|None) -> QDomNodeList: ...
  204. def createEntityReference(self, name: str|None) -> 'QDomEntityReference': ...
  205. def createAttribute(self, name: str|None) -> 'QDomAttr': ...
  206. def createProcessingInstruction(self, target: str|None, data: str|None) -> 'QDomProcessingInstruction': ...
  207. def createCDATASection(self, data: str|None) -> 'QDomCDATASection': ...
  208. def createComment(self, data: str|None) -> 'QDomComment': ...
  209. def createTextNode(self, data: str|None) -> 'QDomText': ...
  210. def createDocumentFragment(self) -> 'QDomDocumentFragment': ...
  211. def createElement(self, tagName: str|None) -> 'QDomElement': ...
  212. class QDomNamedNodeMap(PyQt6.sip.simplewrapper):
  213. @typing.overload
  214. def __init__(self) -> None: ...
  215. @typing.overload
  216. def __init__(self, a0: 'QDomNamedNodeMap') -> None: ...
  217. def contains(self, name: str|None) -> bool: ...
  218. def isEmpty(self) -> bool: ...
  219. def size(self) -> int: ...
  220. def __len__(self) -> int: ...
  221. def count(self) -> int: ...
  222. def length(self) -> int: ...
  223. def removeNamedItemNS(self, nsURI: str|None, localName: str|None) -> QDomNode: ...
  224. def setNamedItemNS(self, newNode: QDomNode) -> QDomNode: ...
  225. def namedItemNS(self, nsURI: str|None, localName: str|None) -> QDomNode: ...
  226. def item(self, index: int) -> QDomNode: ...
  227. def removeNamedItem(self, name: str|None) -> QDomNode: ...
  228. def setNamedItem(self, newNode: QDomNode) -> QDomNode: ...
  229. def namedItem(self, name: str|None) -> QDomNode: ...
  230. def __ne__(self, other: object): ...
  231. def __eq__(self, other: object): ...
  232. class QDomDocumentFragment(QDomNode):
  233. @typing.overload
  234. def __init__(self) -> None: ...
  235. @typing.overload
  236. def __init__(self, x: 'QDomDocumentFragment') -> None: ...
  237. def nodeType(self) -> QDomNode.NodeType: ...
  238. class QDomCharacterData(QDomNode):
  239. @typing.overload
  240. def __init__(self) -> None: ...
  241. @typing.overload
  242. def __init__(self, x: 'QDomCharacterData') -> None: ...
  243. def nodeType(self) -> QDomNode.NodeType: ...
  244. def setData(self, a0: str|None) -> None: ...
  245. def data(self) -> str: ...
  246. def length(self) -> int: ...
  247. def replaceData(self, offset: int, count: int, arg: str|None) -> None: ...
  248. def deleteData(self, offset: int, count: int) -> None: ...
  249. def insertData(self, offset: int, arg: str|None) -> None: ...
  250. def appendData(self, arg: str|None) -> None: ...
  251. def substringData(self, offset: int, count: int) -> str: ...
  252. class QDomAttr(QDomNode):
  253. @typing.overload
  254. def __init__(self) -> None: ...
  255. @typing.overload
  256. def __init__(self, x: 'QDomAttr') -> None: ...
  257. def nodeType(self) -> QDomNode.NodeType: ...
  258. def setValue(self, a0: str|None) -> None: ...
  259. def value(self) -> str: ...
  260. def ownerElement(self) -> 'QDomElement': ...
  261. def specified(self) -> bool: ...
  262. def name(self) -> str: ...
  263. class QDomElement(QDomNode):
  264. @typing.overload
  265. def __init__(self) -> None: ...
  266. @typing.overload
  267. def __init__(self, x: 'QDomElement') -> None: ...
  268. def text(self) -> str: ...
  269. def nodeType(self) -> QDomNode.NodeType: ...
  270. def attributes(self) -> QDomNamedNodeMap: ...
  271. def setTagName(self, name: str|None) -> None: ...
  272. def tagName(self) -> str: ...
  273. def hasAttributeNS(self, nsURI: str|None, localName: str|None) -> bool: ...
  274. def elementsByTagNameNS(self, nsURI: str|None, localName: str|None) -> QDomNodeList: ...
  275. def setAttributeNodeNS(self, newAttr: QDomAttr) -> QDomAttr: ...
  276. def attributeNodeNS(self, nsURI: str|None, localName: str|None) -> QDomAttr: ...
  277. def removeAttributeNS(self, nsURI: str|None, localName: str|None) -> None: ...
  278. @typing.overload
  279. def setAttributeNS(self, nsURI: str|None, qName: str|None, value: str|None) -> None: ...
  280. @typing.overload
  281. def setAttributeNS(self, nsURI: str|None, qName: str|None, value: float) -> None: ...
  282. @typing.overload
  283. def setAttributeNS(self, nsURI: str|None, qName: str|None, value: int) -> None: ...
  284. def attributeNS(self, nsURI: str|None, localName: str|None, defaultValue: str|None = ...) -> str: ...
  285. def hasAttribute(self, name: str|None) -> bool: ...
  286. def elementsByTagName(self, tagname: str|None) -> QDomNodeList: ...
  287. def removeAttributeNode(self, oldAttr: QDomAttr) -> QDomAttr: ...
  288. def setAttributeNode(self, newAttr: QDomAttr) -> QDomAttr: ...
  289. def attributeNode(self, name: str|None) -> QDomAttr: ...
  290. def removeAttribute(self, name: str|None) -> None: ...
  291. @typing.overload
  292. def setAttribute(self, name: str|None, value: str|None) -> None: ...
  293. @typing.overload
  294. def setAttribute(self, name: str|None, value: int) -> None: ...
  295. @typing.overload
  296. def setAttribute(self, name: str|None, value: int) -> None: ...
  297. @typing.overload
  298. def setAttribute(self, name: str|None, value: float) -> None: ...
  299. @typing.overload
  300. def setAttribute(self, name: str|None, value: int) -> None: ...
  301. def attribute(self, name: str|None, defaultValue: str|None = ...) -> str: ...
  302. class QDomText(QDomCharacterData):
  303. @typing.overload
  304. def __init__(self) -> None: ...
  305. @typing.overload
  306. def __init__(self, x: 'QDomText') -> None: ...
  307. def nodeType(self) -> QDomNode.NodeType: ...
  308. def splitText(self, offset: int) -> 'QDomText': ...
  309. class QDomComment(QDomCharacterData):
  310. @typing.overload
  311. def __init__(self) -> None: ...
  312. @typing.overload
  313. def __init__(self, x: 'QDomComment') -> None: ...
  314. def nodeType(self) -> QDomNode.NodeType: ...
  315. class QDomCDATASection(QDomText):
  316. @typing.overload
  317. def __init__(self) -> None: ...
  318. @typing.overload
  319. def __init__(self, x: 'QDomCDATASection') -> None: ...
  320. def nodeType(self) -> QDomNode.NodeType: ...
  321. class QDomNotation(QDomNode):
  322. @typing.overload
  323. def __init__(self) -> None: ...
  324. @typing.overload
  325. def __init__(self, x: 'QDomNotation') -> None: ...
  326. def nodeType(self) -> QDomNode.NodeType: ...
  327. def systemId(self) -> str: ...
  328. def publicId(self) -> str: ...
  329. class QDomEntity(QDomNode):
  330. @typing.overload
  331. def __init__(self) -> None: ...
  332. @typing.overload
  333. def __init__(self, x: 'QDomEntity') -> None: ...
  334. def nodeType(self) -> QDomNode.NodeType: ...
  335. def notationName(self) -> str: ...
  336. def systemId(self) -> str: ...
  337. def publicId(self) -> str: ...
  338. class QDomEntityReference(QDomNode):
  339. @typing.overload
  340. def __init__(self) -> None: ...
  341. @typing.overload
  342. def __init__(self, x: 'QDomEntityReference') -> None: ...
  343. def nodeType(self) -> QDomNode.NodeType: ...
  344. class QDomProcessingInstruction(QDomNode):
  345. @typing.overload
  346. def __init__(self) -> None: ...
  347. @typing.overload
  348. def __init__(self, x: 'QDomProcessingInstruction') -> None: ...
  349. def nodeType(self) -> QDomNode.NodeType: ...
  350. def setData(self, d: str|None) -> None: ...
  351. def data(self) -> str: ...
  352. def target(self) -> str: ...