[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] unsinged short for line numbers
- From: Stefan Froehlich <libxml Froehlich Priv at>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] unsinged short for line numbers
- Date: Wed, 14 Feb 2007 11:05:27 +0100
On Wed, Feb 14, 2007 at 04:57:02AM -0500, Daniel Veillard wrote:
> > | long int *errorLines;
> > | long int errorCount;
> > | xmlNodePtr node;
> > | [...]
> > | errorLines[errorCount] = xmlGetLineNo(node);
> > xmlGetLineNo is declared long, which is fine, but it passes back
> > (struct _xmlNode*)->line, which is unsigned short and the cause of
> > my trouble.
> For very large document you need access to the parser context to
> get the 32bit line number. If the error are issued at parsing time you
> do get the parser context as part of the Structured error callback data.
Problem is, I do _not_ get the error at parsing time. The documents are
(mostly) well formed and survive an
| xmlLineNumbersDefault(1);
| doc = xmlParseFile(filename);
| cur = xmlDocGetRootElement(doc);
perfectly. But when I traverse through the tree afterwards, beginning at
"cur" and analyze its data, I normally find some (purely semantic)
errors which I want to present the user with their line numbers
nevertheless.
Completely out of luck?
Bye,
Stefan
--
Konstelose Kontaktbörse für Österreich - http://kontaktinser.at/
Unkommerziell und werbefrei
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]