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?


bye
thomas


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to