What is the difference between validation and parsing?
I know parsing check file structure (grammar), so may be checked as OK in parsing function, but may be WRONG in validation process because there is no attr value like "pink"? Am I right?
Parsing in xml terms is building a document tree from the xml data
Validation is checking the content of that tree against a schema
So if you had
<Document>Me.txt<\Document>
It could be parsed because it has a root node and all open and close tags match up etc
If you validated against a schema which said the root node was Form though it would be invalid.
Parsing checks that the input conforms to the rules in the XML specification, for example that every start tag has a matching end tag.
Validation checks that the input conforms to the rules of a specific XML vocabulary, for example that a table contains exactly one thead and one tbody.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With