Jump to content

xml validation with xsd


raj87

Recommended Posts

Hi i am new to XSD, need some help

 

i have a XML as

 

<Feature>

<Mobile value="true" group="Samsung_India,Nokia_Finland,Sony_Japan"/>

</Feature>

 

i am validating Mobile tag without "group" attribute as

 

<xsd:element name="Feature">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Mobile" type="Boolean"/>

<xsd:sequence>

<xsd:complexType>

 

My query is to also validate "group" in Mobile tag which has String values with underscore and seperated by commas.

and group values are fixed. Want to validate group values and it should validate pattern of values.

if someboby give invalid values then it should not validate.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...