[xml] Finding a node's line number
- From: Israel Ganor <ganor softlink com>
- To: "'xml gnome org'" <xml gnome org>
- Subject: [xml] Finding a node's line number
- Date: Sun, 9 May 2004 15:57:26 +0200
I need to know the line number of the current node.
I tried this:
xmlLineNumbersDefault(1);
pDoc = xmlParseFile(szFilePath);
// get some node
printf(xmlGetLineNo(node));
Unfortunately, for any node in the file xmlGetLineNo(node) returns the same
number: 1.
(By the way, I tried a libxml2-based tool called xmlstarlet, and it also
returns line number 1 for all the invalid lines in the file).
How can I get the real line number?
(I'm using win32 libxml2 2.6.7).
Thanks in advance
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]