Using xmlvalidatingreader c
The former processes the content of the current node and its subtree against the DTD.
The latter builds up a schema object model (SOM) for the current node based on the XDR or XSD schema source code.
Once the node has been parsed and read, it gets passed on to the internal validator object for further processing.
The validator operates based on the type of the node and the type of validation required.
The handler for the event has the following signature: The Message field returns the description of the error.