If the XML Schema is like this.
 
<xsd:element name="C">
  <xsd:complexType>
   <xsd:attribute name="aaa" type="xsd:string" default="255,255,255"/>
   <xsd:attribute name="bbb" type="xsd:string" default="255,0,0"/>
   <xsd:attribute name="ccc" type="xsd:string" default="255,0,0"/>
   <xsd:attribute name="ddd" type="xsd:string" use="optional"/>
  </xsd:complexType>
</xsd:element>
 
and I generated  Java source using Castor newest version with that schema.
 
I tried to unmarshal the next XML....
 
<C aaa="aaa" bbb="bbb" ccc="ddd" eee="eee"/>
 
It was successful..
 
At this time, I was wonder...
I haven't defined 'eee' as attribute, but I worte it in the XML.
When the xml is unmarshaled, It doesn't matter???
 
 
Regard,
sophia..

Reply via email to