Validate xml request against its xsd
Hi, I am new to this xml stuff . I was assigned a task to validate a xml request against its xsd. It must split each item out and display the values on the form in an easy way to read and grouped as they are in the xsd.
Can anyone give me suggestions how to start doing it? Do i need to write xml files and then xsd and validate开发者_运维知识库 aml against its xsd?
Generally the XSD (also known as a 'schema') is written before the XML files as all XML files must conform to the XSD. A schema defines the allowable format of an XML file that it is validating. W3CSchools has a decent tutorial on the basics of designing a schema.
When you validate the XML file with the schema (using a XML validator), it will tell you if the XML matches the schema and if not, where the errors are.
精彩评论