Title: How to get line/column info for elements,attribs,...?
Hi Marko
 
There isn't currently a way to get the line & column information for dom4j elements. I've added it to the developer to do list so if anyone fancies having a go at implementing it that would be cool. Probably just associating the line & column number with the Element would do for many use cases.
 
BTW the source of an Element is often available via the documents name.
 
Element element = ..;
String source = element.getDocument().getName();

James
----- Original Message -----
Sent: Thursday, November 08, 2001 8:51 PM
Subject: [dom4j-user] How to get line/column info for elements,attribs,...?

Is there any way I can get locator info (source, line, column) for dom4j elements, attributes and text?
There is a Locator interface that is available for the SAX parser, but is it possible to map that to the dom4j object model?

Thank you.

Marko.
.

Reply via email to