469,953 Members | 2,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,953 developers. It's quick & easy.

XML Schema

VJK
Hello,
My XML file is as follows:
---------edited section begins-------------
<name>
<firstName>value1</firstName>
<\name>
<name>
<firstName>value1</firstName>
<middleName>value2</middleName*>
<\name>
<name>
<firstName>value1</firstName>
<middleName>value2</middleName*>
<lastName>value3</lastName>
<\name>
---------edited section ends-------------
Could someone emplain, how to write a valid XML schema for this, please
?
Thanks,
VJK

Jul 20 '05 #1
2 1836
<xs:element name="name">

<xs:complexType>

<xs:sequence>

<xs:element name="firstName" type="xs:string"/>

<xs:sequence minOccurs="0">

<xs:element name="middleName" type="xs:string"/>

<xs:element name="lastName" type="xs:string"
minOccurs="0"/>

</xs:sequence>

</xs:sequence>

</xs:complexType>

</xs:element>
--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"VJK" <vj*****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,
My XML file is as follows:
---------edited section begins-------------
<name>
<firstName>value1</firstName>
<\name>
<name>
<firstName>value1</firstName>
<middleName>value2</middleName*>
<\name>
<name>
<firstName>value1</firstName>
<middleName>value2</middleName*>
<lastName>value3</lastName>
<\name>
---------edited section ends-------------
Could someone emplain, how to write a valid XML schema for this, please
?
Thanks,
VJK
Jul 20 '05 #2
VJK
Stan,

Your answer solved my issue. Thank you very much for your help :-)

VJK

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by wooks | last post: by
1 post views Thread by Hari Om | last post: by
4 posts views Thread by Gordon Dickens | last post: by
4 posts views Thread by Iain A. Mcleod | last post: by
reply views Thread by Derek | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.