blob: 9032706fcd8db89259ca222ffaa2d45cd0720b30 [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
Christian Heimes23790b42013-03-26 17:53:05 +010019.. 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
Georg Brandl8ec7f652007-08-15 14:28:01 +000026.. 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