I am relatively new to XML Schema and have a question about validation. I want to create a Schema to validate a huge customer XML files that we get. I do not have control over the entire XML document, but there are some specific elements I want to validate.
For eg. In the XML document, I want to validate all <Customer> elements, and within <Customer> element I want to make sure there is a couple of important elements: <Name>, <Age>, <City>, <ZipCode>. I do not care about any other elements, text, attributes etc under <Customer>. It seems to me that schema is very heavy weight and does not give me flexibility to specify only required elements.
Please let me know your thoughts.
For eg. In the XML document, I want to validate all <Customer> elements, and within <Customer> element I want to make sure there is a couple of important elements: <Name>, <Age>, <City>, <ZipCode>. I do not care about any other elements, text, attributes etc under <Customer>. It seems to me that schema is very heavy weight and does not give me flexibility to specify only required elements.
Please let me know your thoughts.
Comment