Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAXB default attribute value

Tags:

java

xml

jaxb

xsd

I'm using JAXB annotations to generate xsd schema from my classes.

Annotation @XmlElement with parameter defaultValue sets default value for element. Is it possible to set default value for @XmlAttribute?

P.S. I checked that xsd syntax allow default values for attributes

like image 535
mishadoff Avatar asked Oct 26 '11 21:10

mishadoff


1 Answers

Might wanna check this: Does JAXB support default schema values?

To be honest, I don't have a clue why there isn't an attribute default option in standard JAXB.

like image 62
G_H Avatar answered Oct 12 '22 22:10

G_H