diff options
author | Dave Cole <djc@object-craft.com.au> | 2004-08-26 00:37:31 (GMT) |
---|---|---|
committer | Dave Cole <djc@object-craft.com.au> | 2004-08-26 00:37:31 (GMT) |
commit | 3203efb55fde14c3f567f6864dab1454155d1dcb (patch) | |
tree | b550584948252f2d7677e877776bb3cdeae8faaf /Doc/lib/libpyexpat.tex | |
parent | 0d58e2be0b81c12b0056d458a0480dc525af1abb (diff) | |
download | cpython-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.tex | 20 |
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 |