Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

validation questions

$
0
0

Hi,

I have below elements in my xml

<UserName></UserName><Age></Age><BirthTime></BirthTime>

<Description></Description>

User name value should not be empty.

Age should be integer and should not be empty

BirthTime should be in HH:MM format and can be empty

Description should not empty and should be allowed multilines in the same tag.

--- Not null or empty string<xs:simpleType name="stringval"><xs:restriction base="xs:string"><xs:pattern value="[\s\S]*[^ ][\s\S]*" /></xs:restriction></xs:simpleType>

-- BirthTime<xs:simpleType name="HHMM"><xs:restriction base="xs:string"><xs:pattern value="(0[0-9]|[1][0-9]|2[0-9]):[0-5][0-9]" /></xs:restriction></xs:simpleType>

-- Age

<xs:simpleType name="Integet"><xs:restriction base = "xs:string"><xs:pattern value = "[0-9]*"</xs:restriction></xs:simpleType>

Birth time doesn't allowing empty

description doesn't allowing multiline in the same tag.

Any suggestion please

 


loving dotnet



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>