xml validation with xsd in Schema Posted September 10, 2014 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
xml validation with xsd
in Schema
Posted
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