users@jaxb.java.net

Re: Line-numbers of already parsed elements

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 07 May 2003 10:52:35 -0700

> is there any practical way to find out the line-number of a already
> parsed and bound element? Some of my validations can be only be
> performed AFTER the complete document is parsed and my error-messages
> can't supply a line-number.

I can see the needs. But I'm afraid there's no easy way to do what you
want.

In general this seems like a hard problem, since one object is typically
unmarshaled from an area of an input document, so there's no easy way to
point to a particular element/attribute and say that's where it comes
from. So I guess you are looking at some approximation of that.


I'd appreciate if you could explain more about what you'd like to see.
Then we might be able to work out something.


regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com