summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libpyexpat.tex
diff options
context:
space:
mode:
authorDave Cole <djc@object-craft.com.au>2004-08-26 00:37:31 (GMT)
committerDave Cole <djc@object-craft.com.au>2004-08-26 00:37:31 (GMT)
commit3203efb55fde14c3f567f6864dab1454155d1dcb (patch)
treeb550584948252f2d7677e877776bb3cdeae8faaf /Doc/lib/libpyexpat.tex
parent0d58e2be0b81c12b0056d458a0480dc525af1abb (diff)
downloadcpython-3203efb55fde14c3f567f6864dab1454155d1dcb.zip
cpython-3203efb55fde14c3f567f6864dab1454155d1dcb.tar.gz
cpython-3203efb55fde14c3f567f6864dab1454155d1dcb.tar.bz2
Patch #1014930. Expose current parse location to XMLParser.
Diffstat (limited to 'Doc/lib/libpyexpat.tex')
-rw-r--r--Doc/lib/libpyexpat.tex20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/lib/libpyexpat.tex b/Doc/lib/libpyexpat.tex
index 5b1c737..dd218c6 100644
--- a/Doc/lib/libpyexpat.tex
+++ b/Doc/lib/libpyexpat.tex
@@ -257,6 +257,26 @@ Column number at which an error occurred.
Line number at which an error occurred.
\end{memberdesc}
+The following attributes contain values relating to the current parse
+location in an \class{xmlparser} object. During a callback reporting
+a parse event they indicate the location of the first of the sequence
+of characters that generated the event. When called outside of a
+callback, the position indicated will be just past the last parse
+event (regardless of whether there was an associated callback).
+\versionadded{2.4}
+
+\begin{memberdesc}[xmlparser]{CurrentByteIndex}
+Current byte index in the parser input.
+\end{memberdesc}
+
+\begin{memberdesc}[xmlparser]{CurrentColumnNumber}
+Current column number in the parser input.
+\end{memberdesc}
+
+\begin{memberdesc}[xmlparser]{CurrentLineNumber}
+Current line number in the parser input.
+\end{memberdesc}
+
Here is the list of handlers that can be set. To set a handler on an
\class{xmlparser} object \var{o}, use
\code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must