Xml Schema validation would be a good solution for your problem.
Given an XML document, and a XSD Schema document it needs to conform to, you
can use the XmlValidatingReader class in .NET 1.1 (XmlReader class in .NET
2.0 beta2) to read the document and associate it with the corresponding
schema. The reader goes through the documents and reports all errors it
encountered through an exception handler which also has line number and line
position information and also a good descriptive error message of what the
problem was. You could use this handler to construct your error report for
the data.
more details on how to use XmlValidatingReader to validate is at:
http://msdn.microsoft.com/library/de...ithschemas.asp
Thanks,
Zafar
"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:22**********************************@microsof t.com...
We have an application right now that determines if an XML document sent
in conforms to schema. What we have now been asked to do is add functionality
that creates an exception report for all records that do not conform to
our schema (XSD). One of the team members has built some functionality that
loops through the records, node by node, and determines which nodes do not
conform, but it is taking way too long to develop.
Does anyone know a quicker way to develop this with the .NET XML classes?
We are at brainstorming stage, so any ideas are potential winners.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************