Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I define a complex type node without definign its child elemen

Status
Not open for further replies.

ShubhaMishra

Programmer
Jan 4, 2007
10
IN
Hi,
I have to define a schema file, in that file there is an element of complex type , this element can have any no. of child elements, it means while creating schema i have no idea that what can be the name of child element. OS is there any way to difine this.

For example

<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="PdfTemplate" type="xs:string" minOccurs="0"/>

</xs:sequence>
</xs:complexType>
</xs:element>

This data element can have element "PdfTemplate or anything which is not known at the time of schema creation.Is there any atrribute or anything which can be defined so that DATA element can have any child element.

Thanks,
Shubhangi
 
Thanks Tom,
Its my fault I used that any element

<xs:any minOccurs="0"/>

But just copy paste, just want to say that that if other xsd is not available for those elements, in that case you have to skip that validation, else it will give an error.

<xs:any minOccurs="0" processContents="skip"/>

Thanks,
Shubhangi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top