XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(str);XmlNodeList nodeList = xmlDoc.GetElementsByTagName("file-nb-frames"); string file_nb_frames = string.Empty; foreach (XmlNode node in nodeList) { file_nb_frames = node.InnerText; } Console.WriteLine(file_nb_frames); 现在正在运行。谢谢大家。This is working now. Thank you all. 这篇关于缺少Xmldocument.loadxml根元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-22 20:14