Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 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 | |
Raymond Hettinger | 3029aff | 2011-02-10 08:09:36 +0000 | [diff] [blame] | 8 | **Source code:** :source:`Lib/xml/dom/pulldom.py` |
| 9 | |
| 10 | -------------- |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 11 | |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 12 | :mod:`xml.dom.pulldom` allows building only selected portions of a Document |
| 13 | Object Model representation of a document from SAX events. |
| 14 | |
| 15 | |
Georg Brandl | 7f01a13 | 2009-09-16 15:58:14 +0000 | [diff] [blame] | 16 | .. class:: PullDOM(documentFactory=None) |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 17 | |
| 18 | :class:`xml.sax.handler.ContentHandler` implementation that ... |
| 19 | |
| 20 | |
| 21 | .. class:: DOMEventStream(stream, parser, bufsize) |
| 22 | |
| 23 | ... |
| 24 | |
| 25 | |
Georg Brandl | 7f01a13 | 2009-09-16 15:58:14 +0000 | [diff] [blame] | 26 | .. class:: SAX2DOM(documentFactory=None) |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 27 | |
| 28 | :class:`xml.sax.handler.ContentHandler` implementation that ... |
| 29 | |
| 30 | |
Georg Brandl | 7f01a13 | 2009-09-16 15:58:14 +0000 | [diff] [blame] | 31 | .. function:: parse(stream_or_string, parser=None, bufsize=None) |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 32 | |
| 33 | ... |
| 34 | |
| 35 | |
Georg Brandl | 7f01a13 | 2009-09-16 15:58:14 +0000 | [diff] [blame] | 36 | .. function:: parseString(string, parser=None) |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 37 | |
| 38 | ... |
| 39 | |
| 40 | |
| 41 | .. data:: default_bufsize |
| 42 | |
| 43 | Default value for the *bufsize* parameter to :func:`parse`. |
| 44 | |
Georg Brandl | 55ac8f0 | 2007-09-01 13:51:09 +0000 | [diff] [blame] | 45 | The value of this variable can be changed before calling :func:`parse` and |
| 46 | the new value will take effect. |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 47 | |
| 48 | |
| 49 | .. _domeventstream-objects: |
| 50 | |
| 51 | DOMEventStream Objects |
| 52 | ---------------------- |
| 53 | |
| 54 | |
| 55 | .. method:: DOMEventStream.getEvent() |
| 56 | |
| 57 | ... |
| 58 | |
| 59 | |
| 60 | .. method:: DOMEventStream.expandNode(node) |
| 61 | |
| 62 | ... |
| 63 | |
| 64 | |
| 65 | .. method:: DOMEventStream.reset() |
| 66 | |
| 67 | ... |
| 68 | |