I'm fairly new to xsd. I'm validating xml against xsd using XmlReaderSettings. It looks like my xsd does not verify the element path: My schema definition allows for both OrderProperties and OrderPartners elements, however Partner can be specified only under OrderPartners. In other words, the correct path is OrderPartners/Partner, not OrderProperties/Partner. My xml contains OrderProperties/Partner ONLY and my xml validation code does not give me an error (I'm sure the code is working since it's giving me other errors such as invalid value for an attribute or missing element). I'm trying to figure out if there's something wrong with my validation code or the xsd. Before posting any code, I want to confirm what seems to me to be the case:
1. It is possible to make xsd to impose specific XPath.
2. If xsd requires certain XPath, I have no control over whether the XPath is validated or not.
Thank you for any comments.
1. It is possible to make xsd to impose specific XPath.
2. If xsd requires certain XPath, I have no control over whether the XPath is validated or not.
Thank you for any comments.