Libxml - line numbers

BlitzMax Forums/Brucey's Modules/Libxml - line numbers

Ghost Dancer(Posted 2008) [#1]
I would like to get the line number of a tag within an xml document. I have tried node.getLineNumber() but it returns huge numbers (e.g. 24974770983609520 for an element which is on line 4 in my document).

I know I have the correct node so not sure why I am getting incorrect line numbers. Any ideas what I am doing wrong here?


Brucey(Posted 2008) [#2]
This would be a bug then :-/

For some reason the method is returning a Long, when it should be returning an Int.
For a quick fix (until I get the new version up), you can do the following :
In libxml.bmx, about line 499 :
	Method getLineNumber:Int()

and in libxml_base.bmx, about line 382 :
	Function xmlGetLineNo:Int(node:Byte Ptr)

..where currently they both return ":Long".

Sorry about that.


Ghost Dancer(Posted 2008) [#3]
Ah, I thought it might be something like that. I've made those changes and it works fine now, thanks :-)