users@jaxb.java.net

Re: schema location or namespace of JAXB object

From: Christophe Alexandre <alexandre_at_magillem.com>
Date: Wed, 27 Jun 2007 14:35:03 +0200

Ounce again, thanks four your answers.

What I don't understand is :
- How does JAXB manage to marshal a .xml with the schema location and
namespace information
   when the only argument I give to the marshaller is the
ObjectFactory ?
- When my .xml is unmarshalled, how the unmarshaller manages the
schema location and namespace information ?

Regards.
Christophe



Le 27 juin 07 à 14:00, Kenny MacLeod a écrit :

>> Isn't SchemaFactory reliant on a .xsd ?
>
> It is, but JAXB isn't reliant on schema at all. You can inject a
> Schema into the JAXB unmarshaller if you wish, but that's only to
> add validation.
>
>> My problem is that at runtime I don't have access to the schema
>> but to JAXB instances generated from a .xml unmarshalling.
>> And I want to access the schema location information from any JAXB
>> object.
>
> JAXB itself gives you no help there, you'll need to locate the
> schema yourself.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>