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
48971198
Kaydet (Commit)
48971198
authored
Ara 13, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Finish a sentence that was left half-written!
üst
0e76ab2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
xmlsax.tex
Doc/lib/xmlsax.tex
+20
-16
No files found.
Doc/lib/xmlsax.tex
Dosyayı görüntüle @
48971198
...
@@ -43,25 +43,29 @@ The convenience functions are:
...
@@ -43,25 +43,29 @@ The convenience functions are:
\end{funcdesc}
\end{funcdesc}
A typical SAX application uses three kinds of objects: readers,
A typical SAX application uses three kinds of objects: readers,
handlers and input sources. ``Reader'' in this context is another term
handlers and input sources. ``Reader'' in this context is another
for parser, ie. some piece of code that reads the bytes or characters
term for parser, i.e.
\
some piece of code that reads the bytes or
from the input source, and produces a sequence of events. The events
characters from the input source, and produces a sequence of events.
then get distributed to the handler objects, ie. the reader invokes a
The events then get distributed to the handler objects, i.e.
\
the
method on the handler. A SAX application must therefore obtain a
reader invokes a method on the handler. A SAX application must
handler object, create or open the input sources, create the handlers,
therefore obtain a reader object, create or open the input sources,
and connect these objects all together. As the final step, parsing is
create the handlers, and connect these objects all together. As the
invoked. During parsing
final step of preparation, the reader is called to parse the input.
During parsing, methods on the handler objects are called based on
structural and syntactic events from the input data.
For these objects, only the interfaces are relevant; they are normally
For these objects, only the interfaces are relevant; they are normally
not instantiated by the application itself. Since Python does not have
not instantiated by the application itself.
Since Python does not have
an explicit notion of interface, they are formally introduced as
an explicit notion of interface, they are formally introduced as
classes. The
\class
{
InputSource
}
,
\class
{
Locator
}
,
classes, but applications may use implementations which do not inherit
\class
{
AttributesImpl
}
, and
\class
{
XMLReader
}
interfaces are defined
from the provided classes. The
\class
{
InputSource
}
,
\class
{
Locator
}
,
in the module
\refmodule
{
xml.sax.xmlreader
}
. The handler interfaces
\class
{
AttributesImpl
}
,
\class
{
AttributesNSImpl
}
, and
are defined in
\refmodule
{
xml.sax.handler
}
. For convenience,
\class
{
XMLReader
}
interfaces are defined in the module
\class
{
InputSource
}
(which is often instantiated directly) and the
\refmodule
{
xml.sax.xmlreader
}
. The handler interfaces are defined in
handler classes are also available from
\module
{
xml.sax
}
. These
\refmodule
{
xml.sax.handler
}
. For convenience,
\class
{
InputSource
}
classes are described below.
(which is often instantiated directly) and the handler classes are
also available from
\module
{
xml.sax
}
. These interfaces are described
below.
In addition to these classes,
\module
{
xml.sax
}
provides the following
In addition to these classes,
\module
{
xml.sax
}
provides the following
exception classes.
exception classes.
...
...
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