If you use an event API (either SAX or the internal event API), then you can
get line number information. If you use DOM, then the whole file has already
been parsed by the time you see it. Unless the DOM saves that information
for you (and probably it doesn't), then you can't really get it. If you use
SAX, then look at the SAX Locator interface.
--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]
-----Original Message-----
From: Pete Black [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 4:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Question
Valid XML could be supplied as a multi-line file, or on one single line.
The parser likely doesn't keep track of line numbers, and you may have
to perform a separate pass through the file, line by line doing a
substring compare till you find the start tag.
> Hello.
>
> We use your parser for the processing of the XML files. But we have a
problem.
> It is necessary to define the line number of start-tag in the XML file
during
> the processing.
> We don't know how do it. Can you help us?
>
> Best regards.
> Vasura Oleg.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]