Hello,
I generated code from an XSD like this:
<element name="theName">
<complexType>
<sequence>
<element name="innerElement" minOccurs="0"
maxOccurs="unbounded" >
<complexType />
</element>
</sequence>
<attribute name="AttName" type="string" use="required"
/>
<attribute name="AttType" type="string" />
</complexType>
</element>
The generated code looks good and provides accessors to the attributes.
I tried to unmarshall a XML like this:
<theElement AttName="anElementName" AttType="anElementType">
<innerElement/>
</theElement>
I get an Exception:
org.exolab.castor.xml.MarshalException: theElement is missing required
attribute: AttName
And any attribute accessor returnes NULL.
How can I force Castor to unmarshal Attributes?
--
OPITZ CONSULTING Bad Homburg GmbH
Thomas Papendieck Dipl.-Ing./Dipl.-Inf. Consultant
Kaiser-Friedrich-Promenade 95 - D-61348 Bad Homburg
Phone (Fax): +49 6172 / 66260-1523 (-4500) - Mobile: +49 179 1483 003
http://www.opitz-consulting.de
Geschäftsführer: Bernhard Opitz, Dirk Faulhaber
HRB-Nr. 7100 Amtsgericht Bad Homburg
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email