这是即时消息正在使用的代码
XDocument doc = XDocument.Parse(framedoc.ToString());
foreach (var node in doc.Descendants("document").ToList())
{
XNamespace ns = "xsi";
node.SetAttributeValue(ns + "schema", "");
node.Name = "alto";
}
这是输出
我的目标是这样的
xsi:schemaLocation=""
p1和xmlns:p1 =“ xsi”来自何处?
本文由 投稿者 创作,文章地址:https://blog.isoyu.com/archives/codego-netruheshiyonglinq-xmltianjiamingchengkongjiandaoxml.html
采用知识共享署名4.0 国际许可协议进行许可。除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为:11 月 12, 2019 at 10:55 上午