An XML processing model enables applications that use an XML stream to
perform metadata-based or other processing of data during a data
validation operation while preserving a streaming processing model. For
example, while an XML node is being validated, requests can be received
regarding the status of the validation and any processing that may be
required with the node in order to conform it to requirements of an
external application. A validator exposes public APIs that allow such
validation-time requests from an event handler that is associated with an
external application and that is registered with the XML stream. Messages
that identify schema annotation definitions are provided to an external
application to direct the type of processing to be performed on nodes at
application runtime. Thus, applications can process a node according to
the annotation definition concurrently with validation of the given node
by the validator.