[XML-SIG] how to obtain Byte offset from the Locator...
Lars Marius Garshol
larsga@garshol.priv.no
09 May 2000 21:07:13 +0200
* Greg Wolff
|
| I have a copy of expat for my C++ code but I have found that I don't
| have a copy of the driver for expat for the Python code.
If you download either the XML-SIG package or the saxlib 1.0 package
you will get it.
| I have the xmlproc code and it works just fine, but it doesn't have
| byte offset as far as I can tell.
Actually, it does. The get_offset method on the Parser interface will
give you what you want.
<URL: http://www.stud.ifi.uio.no/~lmariusg/download/python/xml/xmlproc-doco.html#Parser >
| Which file on the xml-sig download page has the Python Expat code in
| it?
This is the one you want.
<URL: http://www.python.org/sigs/xml-sig/files/PyXML-0.5.4.tar.gz >
| Also, is there any chance of trying to work with the SAX 2.0 Python
| code?
Well, you can download the SAX 2.0 release for Python and try to use
it with xmlproc, but I wouldn't really recommend it. Also, you'd have
to add the property yourself.
I am working on SAX 2.0 right now, and will try to get this feature in
as soon as I can.
--Lars M.