I have an xml which is something like 开发者_如何学编程this:
<parent>
<child>
<value>Fixed value</value>
</child>
<child>
<value>Any value</value>
</child>
<child>
<value>Any value</value>
</child>
More children
</parent>
How do I define a schema to check this? i.e. constrain some elements in a sequence of elements to have a child element of a given value. I currently get a warning that the schema is ambiguous.
This is not possible since - as the warning states - it makes the definition of the element ambiguous.
Xml schema doesn't evaluate or validate the content or order of your Xml data, only the structure and data types.
精彩评论