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

Validate loops in XML using XSD

$
0
0

Hi,

In my application i have a parent node which contains many child nodes. I want to validate the number of child nodes using another XML node elements just before the child nodes.

In the example below, i want child nodes of 'CONTENTS' node should not be more than 5.

How i can do this XML validation using XSD validation?

<DATA><COUNTER>5</COUNTER><CONTENTS><CONTENT ID="1" ></CONTENT><CONTENT ID="2" ></CONTENT><CONTENT ID="3" ></CONTENT><CONTENT ID="4" ></CONTENT><CONTENT ID="5" ></CONTENT><CONTENT ID="6" ></CONTENT></CONTENTS></DATA>

Thanks,

IamHuM


Viewing all articles
Browse latest Browse all 935

Trending Articles



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