Hi,

 

There might be a simple solution to this; tried searching through
archive did not get any answer.

 

We have xml structure something like this.

 

<test name="name1">value1</test>

 

Here the element has an attribute which makes it's a complex type and
text value, however when I define xsd as ..

 

<xs:element name="test" type="xs:string">

      <xs:complexType>

            <xs:attribute name="name" type="xs:string"/>

      </xs:complexType>

</xs:element>

 

xmlBean api gives out following error 

 

...xsd:14:9: error: src-element.3: Illegal to define a nested type when
a type attribute is specified.

 

If I remove type="xs:string" then it can't have simple string. 

Is it possible to define a simple element with and attribute? 

 

 

Thanks in advance

Shishupal

 

 

Reply via email to