I've a requirement to validate a XML. Nodes in XML are of two types: Mandatory and Optional.
Optional nodes are those who satisfy the below conditions.
1) Either empty
2) If it contains a value, it has to be of a definite length.
Let us say ProductCode is the node (If not empty, value's length has to be 4. Type can be either string or int)
<ProductCode /> - Valid
<ProductCode>1233</ProductCode> - Valid
<ProductCode>12334</ProductCode> - Invalid
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?