Generating an XSD with anyAttribute set for all Elements in the XML

Arkk

New Member
I would like to generate an XML Schema for an XML instance.I have been using XMLBeans currently, using which I am able to generate a schema, but fails compliance as my XML Instance can contain some attributes not specified in schema. Wildcard not allowed error obviously. So, I would like to say "anyAttribute" for all the elements in the schema. My sample xml:\[code\]<parent> <child anyAttMayCome="">value</child> </parent>\[/code\]XML schema for this: \[code\]<element name="parent"> <complexType> <sequence> <element name="child " type="xsd:string"> <complexType> <xsd:anyAttribute namespace="##any" processContents="skip" /> </complexType> </element> </sequence></complexType></element>\[/code\]where the allows any attribute to present in the element. Is there any way I can achieve this ? Thanks.
 
Back
Top