Re: [xml] Line numbers for error messages
- From: Daniel Veillard <veillard redhat com>
- To: James Gallagher <jgallagher gso uri edu>
- Cc: libxml2 <xml gnome org>
- Subject: Re: [xml] Line numbers for error messages
- Date: Mon, 2 Jun 2003 17:11:44 -0400
On Mon, Jun 02, 2003 at 01:56:12PM -0700, James Gallagher wrote:
Hello,
I have a couple of SAX parsers implemented using libxml2. I wanted line
numbers in error messages so I wound up writing code that I think used
the internal interfaces of the library (xmlCreateFileParserCtxt and
xmlParseDocument). Inside my error callback I use getLineNumber when
building error messages. Is there a better way to get the line numbers
inside my error callback?
Check ctxt->input structure, it has both the filename and the line number
see error.c:xmlParserPrintFileInfo()
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]