ASP数据插入XML,插进某个节点内。求大神

图片说明](https://img-ask.csdn.net/upload/201512/21/1450678470_554406.png)

图片说明](https://img-ask.csdn.net/upload/201512/21/1450678593_204250.png)
想添加的数据放进: 里面,而不是外面。

private string filePath = string.Empty;

public void Addxml(string musicName, string musicLink)
{
filePath = Server.MapPath(@"playlist.xml");

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(filePath);

    XmlNode xmldocSelect = xmlDoc.SelectSingleNode("trackList");


    XmlElement xM = xmlDoc.CreateElement("track");

    XmlElement mL = xmlDoc.CreateElement("location");
    XmlElement mN = xmlDoc.CreateElement("title");

    mL.InnerText = musicLink;
    mN.InnerText = musicName;

    xM.AppendChild(mL);
    xM.AppendChild(mN);

    xmlDoc.DocumentElement.AppendChild(xM);
    xmlDoc.Save(filePath);
}





参考下:http://blog.sina.com.cn/s/blog_699337e60100ku1i.html