private static string GetTargetNamespace(string fullSchema)
{
XmlDocument xd = new XmlDocument();
xd.LoadXml(fullSchema);
XmlAttributeCollection attributeList = xd.DocumentElement.Attributes;
foreach (XmlAttribute attribute in attributeList)
{
if (attribute.Name.Equals("targetNamespace", StringComparison.OrdinalIgnoreCase))
{
return attribute.Value;
}
}
return string.Empty;
}