獲取xmlns對應信息,代碼如下:
XmlDocument document = new XmlDocument();
document.Load(filePath); //filePath爲XML文件路徑或者文件名稱
XmlNodeList nodeList = document.GetElementsByTagName("SCL");
foreach (XmlNode node in nodeList)
{
string nameSpace = node.Attributes.GetAttributeValue("xmlns");
}