C# Xml
时间:2011-03-01 来源:FtpCsharp
document.Load(xmlpath); //load xml by the absoult path
XmlNodeList nodeList = document.GetElementsByTagName("nodetagname"); //get the nodelist of nodetagname
XmlElement element = document.CreateElement("newnodename"); //create node
element.SetAttribute("attributename", "attributevalue"); //set attribute
nodeList[0].AppendChild(element); //add the node to nodeList[0]
相关阅读 更多 +
排行榜 更多 +