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