show your code, did you use the right XPath??         string sFile = Server.MapPath("TreeNode.xml");
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(sFile);
XmlNode node = xmldoc.SelectSingleNode("//TreeNode[@id='oos']");
if (node != null)
{
XmlElement ele = xmldoc.CreateElement("TreeNode");
XmlAttribute att = xmldoc.CreateAttribute("Text");
att.Value = "hello world";
ele.Attributes.Append(att); att = xmldoc.CreateAttribute("id");
att.Value = "ppf";
ele.Attributes.Append(att);

node.AppendChild(ele);
}