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
1d8ad2b1
Kaydet (Commit)
1d8ad2b1
authored
Şub 14, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated to reflect the additional information and interfaces exported in
pyexpat.c revision 2.40.
üst
bd6101c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
5 deletions
+43
-5
libpyexpat.tex
Doc/lib/libpyexpat.tex
+43
-5
No files found.
Doc/lib/libpyexpat.tex
Dosyayı görüntüle @
1d8ad2b1
...
@@ -32,10 +32,14 @@ provide access to the Expat parser. Direct use of the
...
@@ -32,10 +32,14 @@ provide access to the Expat parser. Direct use of the
This module provides one exception and one type object:
This module provides one exception and one type object:
\begin{excdesc}
{
e
rror
}
\begin{excdesc}
{
ExpatE
rror
}
The exception raised when Expat reports an error.
The exception raised when Expat reports an error.
\end{excdesc}
\end{excdesc}
\begin{excdesc}
{
error
}
Alias for
\exception
{
ExpatError
}
.
\end{excdesc}
\begin{datadesc}
{
XMLParserType
}
\begin{datadesc}
{
XMLParserType
}
The type of the return values from the
\function
{
ParserCreate()
}
The type of the return values from the
\function
{
ParserCreate()
}
function.
function.
...
@@ -126,6 +130,14 @@ Returns a string containing the base set by a previous call to
...
@@ -126,6 +130,14 @@ Returns a string containing the base set by a previous call to
\method
{
SetBase()
}
hasn't been called.
\method
{
SetBase()
}
hasn't been called.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
[xmlparser]
{
GetInputContext
}{}
Returns the input data that generated the current event as a string.
The data is in the encoding of the entity which contains the text.
When called while an event handler is not active, the return value is
\code
{
None
}
.
\versionadded
{
2.1
}
\end{methoddesc}
\begin{methoddesc}
[xmlparser]
{
ExternalEntityParserCreate
}{
context
\optional
{
,
\begin{methoddesc}
[xmlparser]
{
ExternalEntityParserCreate
}{
context
\optional
{
,
encoding
}}
encoding
}}
Create a ``child'' parser which can be used to parse an external
Create a ``child'' parser which can be used to parse an external
...
@@ -385,6 +397,32 @@ If this handler is not provided, external entities are reported by the
...
@@ -385,6 +397,32 @@ If this handler is not provided, external entities are reported by the
\end{methoddesc}
\end{methoddesc}
\subsection
{
ExpatError Exceptions
\label
{
expaterror-objects
}}
\sectionauthor
{
Fred L. Drake, Jr.
}{
fdrake@acm.org
}
\exception
{
ExpatError
}
exceptions have a number of interesting
attributes:
\begin{memberdesc}
[ExpatError]
{
code
}
Expat's internal error number for the specific error. This will
match one of the constants defined in the
\code
{
errors
}
object from
this module.
\versionadded
{
2.1
}
\end{memberdesc}
\begin{memberdesc}
[ExpatError]
{
lineno
}
Line number on which the error was detected. The first line is
numbered
\code
{
1
}
.
\versionadded
{
2.1
}
\end{memberdesc}
\begin{memberdesc}
[ExpatError]
{
offset
}
Character offset into the line where the error occurred. The first
column is numbered
\code
{
0
}
.
\versionadded
{
2.1
}
\end{memberdesc}
\subsection
{
Example
\label
{
expat-example
}}
\subsection
{
Example
\label
{
expat-example
}}
The following program defines three handlers that just print out their
The following program defines three handlers that just print out their
...
@@ -493,10 +531,10 @@ The model must occur zero or more times, as for \code{A*}.
...
@@ -493,10 +531,10 @@ The model must occur zero or more times, as for \code{A*}.
\subsection
{
Expat error constants
\label
{
expat-errors
}}
\subsection
{
Expat error constants
\label
{
expat-errors
}}
\sectionauthor
{
A.M. Kuchling
}{
amk1@bigfoot.com
}
\sectionauthor
{
A.M. Kuchling
}{
amk1@bigfoot.com
}
The following
table lists the error constants in the
The following
constants are provided in the
\code
{
errors
}
object of
\code
{
errors
}
object of the
\module
{
xml.parsers.expat
}
module. These
the
\refmodule
{
xml.parsers.expat
}
module. These constants are useful
constants are useful in interpreting some of the attributes of the
in interpreting some of the attributes of the
\exception
{
ExpatError
}
parser object after
an error has occurred.
exception objects raised when
an error has occurred.
The
\code
{
errors
}
object has the following attributes:
The
\code
{
errors
}
object has the following attributes:
...
...
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