Nicolas Pujol wrote:
> Is there a way to get the url/name of the original xml's schema
> reference (i.e. xsi:noNamespaceSchemaLocation) ?
Not from JAXB, but you can write a SAX filter to fetch this value or
xmlpull can be used for a similar purpose --- see xmlpull example. Or if
you don't mind some performance penalty, the easiest thing to do is to
first read into DOM to get that value, then unmarshal that in JAXB.
> This is so I can do some version control of the passed in xml...In my
> case, the schema/jaxb classes have changed a bit but still parse the old
> xml docs ok. I want to be able to detect that the passed in xml is from
> an older version. I have alternatives now, but I was looking for a less
> intrusive way.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com