getting location of schema used
-
I load in an xml document and validate it ... ok thats the easy part XmlDocument doc = new XmlDocument(); XmlTextReader tr = new XmlTextReader("Sample.xml"); XmlValidatingReader reader = new XmlValidatingReader(tr); doc.Load(reader); there might be several schemas that are used to validate, their location is specified via the xml schemalocation attribute. Now if I want a table of those locations i presently read and parse the location attribute and manually match up the namespace prefix with the location file via the namespace URI. So i can go and physically read in the validating schemas. XmlNode myNode = oc.SelectSingleNode("//instance:group",xmlnsmgr); XmlNodeReader myreader = new XmlNodeReader(myNode); myreader.Read(); myreader.MoveToAttribute("schemaLocation",this.xml_schema_ns); String[] schemalist = myreader.Value.Split(new char[] {' '}); The must be a simplier way I dont know about, please if anybody knows can the enlighten me. Thanks in Advance James