What is a good replacement for the legacy XmlValidatingReader class?

When I try to create an application with C #, this method gave me a warning

//get validator XmlValidatingReader xmlValidator = new XmlValidatingReader(new FileStream(xmlfile,FileMode.Open), XmlNodeType.Document,psContext); 

and

  //compile to load schema elements schema.Compile(new ValidationEventHandler(ValidationCallback)); 

I am using VS 2008 with the .NET Framework 3.5 to implement this.

Please give me the correct way to do this.

+4
source share
1 answer

To check your XML documents for an XSD schema, use System.Xml.Schema.XmlSchemaSet

+1
source

Source: https://habr.com/ru/post/1412476/


All Articles