System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v23 C# (CSharp) Method

v23() private method

private v23 ( ) : void
return void
        public void v23()
        {
            Initialize();
            XmlSchemaSet xss = new XmlSchemaSet();
            xss.ValidationEventHandler += ValidationCallback;
            xss.Add(null, Path.Combine(TestData._Root, "bug356711_root.xsd"));

            try
            {
                XmlReader r1 = CreateReader(Path.Combine(TestData._Root, "bug356711_1.xml"), true);
                XmlReader r2 = CreateReader(r1, xss, false);
                while (r2.Read()) ;
            }
            catch (XmlException)
            {
                Assert.True(false);
            }
            CError.Compare(errorCount, 0, "ProhibitDTD did not work with schemaLocation");
            return;
        }
    }