> If my source xml file looks like the following, it works.
>
> <Req
> xmlns="url of the schema">
> <Version>5.3.0</Version>
> ..
> </Req>
>
> But if the source file is this (declare a namespace for the schema, e.g. 'm'), then I get a validation exception.
> <m:Req
> xmlns:m="url of the schema">
> <Version>5.3.0</Version>
> ..
> </m:Req>
>
> Could someone please tell me how to config JAXB so that source xml #2 will work too?
Those two XML documents are totally different and so you are probably
misunderstanding the concept of XML namespace.
I suggest the following reading:
http://www.jclark.com/xml/xmlns.htm
regards,
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net