[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] Line numbers for error messages



On Mon, 2003-06-02 at 14:11, Daniel Veillard wrote:
> 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()

Thanks.

James
> 
> Daniel
-- 
__________________________________________________________________________
James Gallagher		         The Distributed Oceanographic Data System
jgallagher gso uri edu               http://unidata.ucar.edu/packages/dods
Voice: 775.337.8612					 Fax: 775.337.2105



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]