开发者

Validate xml request against its xsd

开发者 https://www.devze.com 2023-04-13 00:00 出处:网络
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 t

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号