You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Elizabeth Walkup <ew...@gs.washington.edu> on 2003/01/06 23:14:06 UTC

How to get a line number from a DOMNode?

Is there a way I can retrieve the file and line number corresponding
to a given DOMNode?  It appears that line numbers are only available
from DOMLocators, which are only created when an error is detected
during parsing.

Thanks,

Elizabeth


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: How to get a line number from a DOMNode?

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
	the information is available at parse time. You will have to bind
it to the DOMNodes then (perhaps using UserInfo).


Gareth



On Mon, 6 Jan 2003, Elizabeth Walkup wrote:

>
> Is there a way I can retrieve the file and line number corresponding
> to a given DOMNode?  It appears that line numbers are only available
> from DOMLocators, which are only created when an error is detected
> during parsing.
>
> Thanks,
>
> Elizabeth
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org