users@jaxb.java.net

Re: version attribute of <xs:schema ...> tag

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Fri, 27 Aug 2004 11:35:23 -0400

MRist_at_lstelcom.com wrote:
>
> how can I obtain the version attribute value of the schema tag using JAXB
> generated classes?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://www.aNS"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.aNS"
> elementFormDefault="qualified" version="2.2.1">
> ..
>

JAXB maps XML instance documents to Java objects and doesn't really
expose any of the schema meta data in the generated classes (enum
values, min/max, etc). You would have to sniff the version number
some other way (perhaps StaX or SAX).

Thanks,

--Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net