[jboss-dev-forums] [JBoss XML Binding Development] - Re: How to retrieve the value of a
alex.loubyansky@jboss.com
do-not-reply at jboss.com
Fri Oct 23 09:50:09 EDT 2009
Use controls presence. If use="required" the attribute must appear in the XML.
Fixed is a value constraint. If the attribute is present and different from the fixed value the parsing will fail.
All this stuff is handled by the underlying xml parser, which is xerces SAX in our case. Xerces will include fixed and default attributes into org.xml.sax.Attributes only if schema validation is enabled.
In XB you can do that by unmarshaller.setSchemaValidation(true);
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261866#4261866
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261866
More information about the jboss-dev-forums
mailing list