summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libpyexpat.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-08-10 17:18:32 (GMT)
committerFred Drake <fdrake@acm.org>2004-08-10 17:18:32 (GMT)
commitd62d507b9a5434a7e2161c5b672c7f585e1ff388 (patch)
tree0e40550f16faa5579101405b74a697b07638faf7 /Doc/lib/libpyexpat.tex
parentfb568ca52a0be14a8c12d37aaa5f85cd5ee889c7 (diff)
downloadcpython-d62d507b9a5434a7e2161c5b672c7f585e1ff388.zip
cpython-d62d507b9a5434a7e2161c5b672c7f585e1ff388.tar.gz
cpython-d62d507b9a5434a7e2161c5b672c7f585e1ff388.tar.bz2
added missing documentation for UseForeignDTD() (new in 2.3)
someone should backport to the release23-maint branch
Diffstat (limited to 'Doc/lib/libpyexpat.tex')
-rw-r--r--Doc/lib/libpyexpat.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/lib/libpyexpat.tex b/Doc/lib/libpyexpat.tex
index 4fc103d..5b1c737 100644
--- a/Doc/lib/libpyexpat.tex
+++ b/Doc/lib/libpyexpat.tex
@@ -156,6 +156,27 @@ The child parser is created with the \member{ordered_attributes},
values of this parser.
\end{methoddesc}
+\begin{methoddesc}[xmlparser]{UseForeignDTD}{\optional{flag}}
+Calling this with a true value for \var{flag} (the default) will cause
+Expat to call the \member{ExternalEntityRefHandler} with
+\constant{None} for all arguments to allow an alternate DTD to be
+loaded. If the document does not contain a document type declaration,
+the \member{ExternalEntityRefHandler} will still be called, but the
+\member{StartDoctypeDeclHandler} and \member{EndDoctypeDeclHandler}
+will not be called.
+
+Passing a false value for \var{flag} will cancel a previous call that
+passed a true value, but otherwise has no effect.
+
+This method can only be called before the \method{Parse()} or
+\method{ParseFile()} methods are called; calling it after either of
+those have been called causes \exception{ExpatError} to be raised with
+the \member{code} attribute set to
+\constant{errors.XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING}.
+
+\versionadded{2.3}
+\end{methoddesc}
+
\class{xmlparser} objects have the following attributes: