Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
969b8daf
Kaydet (Commit)
969b8daf
authored
Mar 16, 2012
tarafından
Eli Bendersky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #14202: some additional doc fixes
üst
16d84ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
xml.dom.pulldom.rst
Doc/library/xml.dom.pulldom.rst
+13
-14
No files found.
Doc/library/xml.dom.pulldom.rst
Dosyayı görüntüle @
969b8daf
...
...
@@ -44,11 +44,12 @@ Example::
Since the document is treated as a "flat" stream of events, the document "tree"
is implicitly traversed and the desired elements are found regardless of their
depth in the tree. In other words, one does not need to consider hierarchical issues
such as recursive searching of the document nodes, although if the context of
elements were important, one would either need to maintain some context-related
state (ie. remembering where one is in the document at any given point) or to
make use of the :func:`DOMEventStream.expandNode` method and switch to DOM-related processing.
depth in the tree. In other words, one does not need to consider hierarchical
issues such as recursive searching of the document nodes, although if the
context of elements were important, one would either need to maintain some
context-related state (i.e. remembering where one is in the document at any
given point) or to make use of the :func:`DOMEventStream.expandNode` method
and switch to DOM-related processing.
.. class:: PullDom(documentFactory=None)
...
...
@@ -71,11 +72,9 @@ make use of the :func:`DOMEventStream.expandNode` method and switch to DOM-relat
If you have XML in a string, you can use the :func:`parseString` function instead:
.. function:: parseString(string, parser=None)
Return a :class:`DOMEventStream` that represents the (unicode) *string*.
Return a :class:`DOMEventStream` that represents the (Unicode) *string*.
.. data:: default_bufsize
...
...
@@ -84,7 +83,6 @@ If you have XML in a string, you can use the :func:`parseString` function instea
The value of this variable can be changed before calling :func:`parse` and
the new value will take effect.
.. _domeventstream-objects:
DOMEventStream Objects
...
...
@@ -93,16 +91,17 @@ DOMEventStream Objects
.. class:: DOMEventStream(stream, parser, bufsize)
.. method::
DOMEventStream.
getEvent()
.. method:: getEvent()
Return a tuple containing *event* and the current *node* as
:class:`xml.dom.minidom.Document` if event equals START_DOCUMENT,
:class:`xml.dom.minidom.Element` if event equals START_ELEMENT or
END_ELEMENT or :class:`xml.dom.minidom.Text` if event equals CHARACTERS.
:class:`xml.dom.minidom.Document` if event equals :data:`START_DOCUMENT`,
:class:`xml.dom.minidom.Element` if event equals :data:`START_ELEMENT` or
:data:`END_ELEMENT` or :class:`xml.dom.minidom.Text` if event equals
:data:`CHARACTERS`.
The current node does not contain informations about its children, unless
:func:`expandNode` is called.
.. method::
DOMEventStream.
expandNode(node)
.. method:: expandNode(node)
Expands all children of *node* into *node*. Example::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment