G
Guest
Hi,
I'm using C# in VS.NET 2005. I have got the code working to validate an
entire XML file and raise events for validation errors and warnings (see
below). My question is how can I modify this code so that I end up with two
XML documents, one with the valid records and one with the rejected?
TIA.
....
fs = new FileStream(xmlFile, FileMode.Open);
XmlReaderSettings settings = new XmlReaderSettings();
settings.Schemas.Add("", schemaFile);
settings.ValidationType = ValidationType.Schema;
settings.ValidationEventHandler += new
ValidationEventHandler(ValidationEventHandler);
reader = XmlReader.Create(fs, settings);
while (reader.Read());
....
I'm using C# in VS.NET 2005. I have got the code working to validate an
entire XML file and raise events for validation errors and warnings (see
below). My question is how can I modify this code so that I end up with two
XML documents, one with the valid records and one with the rejected?
TIA.
....
fs = new FileStream(xmlFile, FileMode.Open);
XmlReaderSettings settings = new XmlReaderSettings();
settings.Schemas.Add("", schemaFile);
settings.ValidationType = ValidationType.Schema;
settings.ValidationEventHandler += new
ValidationEventHandler(ValidationEventHandler);
reader = XmlReader.Create(fs, settings);
while (reader.Read());
....