[xml] Finding a node's line number

I need to know the line number of the current node.
I tried this:

    pDoc = xmlParseFile(szFilePath);
    // get some 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]