[yunqa.de] Re: DIXml V1.0 Trial: XmlNodePtr and LineNo - what is the purpose?

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Mon, 07 Jul 2008 12:20:17 +0200

Adam Russell wrote:

>but the xmlGetLineNo function seems to only return a discrete number
>of values, no matter which node I select (0, 3 and 15 in my example).

Line number storage is not activated by default. Use

    xmlLineNumbersDefault(1);

to set this option (before parsing).

>Anyway, what is the purpose of the LineNo value and how should I use it.

Do not use the xmlNode.LineNo field directly. Instead call the xmlGetLineNo() 
function which can retrieves line numbers for some node types for which they 
are not recorded (from parent nodes, for example).

Ralf 

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: