[jdom-interest] How to find out the line number in the XML document instance

Olle Hallin olle.hallin at hit.se
Thu Apr 11 15:36:13 PDT 2002

Hi all JDOM gurus!

I am writing a product configurator driven by an XML document that defines all products and their components.

In order to keep it simple, the plan is to let the product managers maintain this file directly by means of XML Spy assisted by an XML Schema.
Many errors will be trapped by the schema, but not all.

My question now is how to find the line number in the original XML document instance that corresponds to a certain JDOM Element?
I want to give as exakt error messages as possible should I detect an error in an XML instance that has passed the schema validation.

 I use Xerces-J 2.0.0 as parser.

Olle Hallin

More information about the jdom-interest mailing list