String Xpath = "// Topic";
String path = "d: //roy/notebook.xml";
XMLDocument Xmldoc = new xmldocument ();
XMLDoc.Load (path);
XMLNode root = xmldoc.selectsinglenode (xpath);
XmLelement Tz = Xmldoc.createElement ("subtopic");
Tz.SetaTRibute ("Subject", "Test");
Root.Appendchild (TZ);
XMLDoc.save (path);