SV: [jdom-interest] Line numbers

Jason Hunter jhunter at servlets.com
Tue Aug 26 12:14:46 PDT 2003


It's an idea that's been thrown out periodically.  You can see in the 
TODO.txt a reference to this ides and a URL to a post from October 2000. 
  The problem is it increases the required memory by 4 bytes per element 
and probably slows the build somewhat.  Is it worth it?  Perhaps to 
some, perhaps not to others.  We've used this feature as an example of 
what someone should be able to add to JDOM using inheritance if JDOM's 
designed well.

-jh-

Paul Cantrell wrote:

> Per --
> 
> This looks excellent.  Thank you very much!  I doubt I ever would have 
> figured that out on my own!  I'll give it a try later today.
> 
> To the JDOM developers: This seems like it would be a really useful 
> feature for JDOM to support, and it looks like something you could do 
> fairly generically, without compromising JDOM's design.  If you have a 
> feature request tracking system, well, consider this a request.
> 
> Cheets,
> 
> Paul
> 
> 
> On Tuesday, August 26, 2003, at 03:48  AM, Per Norrman wrote:
> 
>> Hi,
>>
>> SAX provides the  Locator interface, which is an optional
>> thing for parsers to implement.
>>
>> Sometimes, I just have to solve things like this. I
>> subclassed DefaultJDOMFactory and Element, as well as
>> SAXBuilder and SAXHandler. There may be a more elegant
>> way....
>>
>> I've attached some code and a test data file.
>>
>> /pmn
>>
>>> -----Ursprungligt meddelande-----
>>> Från: jdom-interest-admin at jdom.org
>>> [mailto:jdom-interest-admin at jdom.org] För Paul Cantrell
>>> Skickat: den 26 augusti 2003 02:38
>>> Till: jdom-interest at jdom.org
>>> Ämne: [jdom-interest] Line numbers
>>>
>>>
>>> A question that I'm sure you're sick of hearing, but I didn't
>>> see it in
>>> the FAQ:
>>>
>>> Is it possible for me to trace a parsed element back to the
>>> line number
>>> on which it appeared in the XML source?  Probably this information is
>>> thrown away before it even gets to JDOM, but if there's any
>>> way to get
>>> at it, it sure would be nice.....
>>>
>>> Cheers,
>>>
>>> Paul
>>> http://innig.net
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com 
> 
> 




More information about the jdom-interest mailing list