1:mod:`xml.dom.pulldom` --- Support for building partial DOM trees
2=================================================================
3
4.. module:: xml.dom.pulldom
5   :synopsis: Support for building partial DOM trees from SAX events.
6.. moduleauthor:: Paul Prescod <paul@prescod.net>
7
8
9.. versionadded:: 2.0
10
11**Source code:** :source:`Lib/xml/dom/pulldom.py`
12
13--------------
14
15:mod:`xml.dom.pulldom` allows building only selected portions of a Document
16Object Model representation of a document from SAX events.
17
18
19.. warning::
20
21   The :mod:`xml.dom.pulldom` module is not secure against
22   maliciously constructed data.  If you need to parse untrusted or
23   unauthenticated data see :ref:`xml-vulnerabilities`.
24
25
26.. class:: PullDOM([documentFactory])
27
28   :class:`xml.sax.handler.ContentHandler` implementation that ...
29
30
31.. class:: DOMEventStream(stream, parser, bufsize)
32
33   ...
34
35
36.. class:: SAX2DOM([documentFactory])
37
38   :class:`xml.sax.handler.ContentHandler` implementation that ...
39
40
41.. function:: parse(stream_or_string[, parser[, bufsize]])
42
43   ...
44
45
46.. function:: parseString(string[, parser])
47
48   ...
49
50
51.. data:: default_bufsize
52
53   Default value for the *bufsize* parameter to :func:`parse`.
54
55   .. versionchanged:: 2.1
56      The value of this variable can be changed before calling :func:`parse` and the
57      new value will take effect.
58
59
60.. _domeventstream-objects:
61
62DOMEventStream Objects
63----------------------
64
65
66.. method:: DOMEventStream.getEvent()
67
68   ...
69
70
71.. method:: DOMEventStream.expandNode(node)
72
73   ...
74
75
76.. method:: DOMEventStream.reset()
77
78   ...
79
80