tags:

views:

17

answers:

1

Hi everyone,

XSD file has include tag that has location for the other reference XSD. When we load original XSD in C# into XmlSchema object how to get the location of the referenced XSD?

Thanks

A: 
    XmlSchema schema = XmlSchema.Read(new StreamReader(cXMLpath), null);

    if(schema.Includes.Count > 0)
    {
        foreach (XmlSchemaExternal external in schema.Includes)
        {
            Console.WriteLine(external.SchemaLocation);
        }
    }
SonOfOmer