获取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");
}