[jdom-interest] referring to line numbers

Jason Hunter jhunter at collab.net
Sat Jun 16 13:03:13 PDT 2001

Daniel Rubin wrote:
> Hello,
> After I've parsed an xml file & created the DOM with
> jdom, I want to be able to have each element know the
> line number in the xml document from which it came.
> Any way to get at this?

Not currently.  It's something we've been discussing.  The downside of
making it standard is the extra time and memory consumed.  If it's truly
important to you, you can easily write a subclass of Element and modify
the builder slightly to use your subclass and pass it the line number
from the Locator.


More information about the jdom-interest mailing list