Parsing vs Validation

parsing, validation, xml

Solution

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.

Problem

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?

Original source