Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Line Breaks in XML Parsing

843834Oct 14 2005
Hello,

I am parsing an xml file using SAX parser and JAXP. While parsing, I would like to track the line numbers of the file according to the line breaks encountered while parsing. For example,

<a>
<b> hello </b>
<p> world </p>
</a>

Here, I would like to trace the line breaks and say, that the word "world" is in line number 3 after rendering. Could anyone please help me in getting the solution?

Thanks,
Shiv.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2005
Added on Oct 14 2005
0 comments
118 views