blob: bad0daa7335fb849615a5adbc768acdef088717c [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001: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
Éric Araujo29a0b572011-08-19 02:14:03 +020011**Source code:** :source:`Lib/xml/dom/pulldom.py`
12
13--------------
14
Georg Brandl8ec7f652007-08-15 14:28:01 +000015:mod:`xml.dom.pulldom` allows building only selected portions of a Document
16Object Model representation of a document from SAX events.
17
18
19.. class:: PullDOM([documentFactory])
20
21 :class:`xml.sax.handler.ContentHandler` implementation that ...
22
23
24.. class:: DOMEventStream(stream, parser, bufsize)
25
26 ...
27
28
29.. class:: SAX2DOM([documentFactory])
30
31 :class:`xml.sax.handler.ContentHandler` implementation that ...
32
33
34.. function:: parse(stream_or_string[, parser[, bufsize]])
35
36 ...
37
38
39.. function:: parseString(string[, parser])
40
41 ...
42
43
44.. data:: default_bufsize
45
46 Default value for the *bufsize* parameter to :func:`parse`.
47
48 .. versionchanged:: 2.1
49 The value of this variable can be changed before calling :func:`parse` and the
50 new value will take effect.
51
52
53.. _domeventstream-objects:
54
55DOMEventStream Objects
56----------------------
57
58
59.. method:: DOMEventStream.getEvent()
60
61 ...
62
63
64.. method:: DOMEventStream.expandNode(node)
65
66 ...
67
68
69.. method:: DOMEventStream.reset()
70
71 ...
72