hi ...
i have a query i have created an application in c# i have put this code in button
string strXmlPath = "";
XmlDocument doc = new XmlDocument();
strXmlPath = ("C:/App_Data/Document.xml");
DataSet ds = new DataSet();
XmlTextWriter writer = new XmlTextWriter(strXmlPath,System.Text.Encoding.UTF8);
writer.WriteStartElement("folder");
writer.WriteElementString("FolderName", "App_Data");
writer.WriteElementString("FolderPath", "C:/App_Data/Document.xml");
writer.WriteEndElement();
writer.WriteStartElement("folder2");
writer.WriteElementString("FolderName", "App_Data");
writer.WriteElementString("FolderPath", "C:/App_Data/Document.xml");
writer.WriteEndElement();
ds.WriteXml(@strXmlPath, System.Data.XmlWriteMode.WriteSchema);
writer.WriteElementString("FolderName", "App_Data");
writer.WriteElementString("FolderPath", "C/App_Data/Document.xml");
writer.WriteEndElement();
//XmlNode parentNode = doc.DocumentElement;
//XmlNode bookNode = doc.CreateNode(XmlNodeType.Element, "book", null);
//doc.AppendChild(bookNode);
//XmlAttribute attr = doc.CreateAttribute("space");
//attr.InnerText = "4";
//bookNode.Attributes.Append(attr);
// Flush
//DisplayCatalog();
writer.Close();
}
but it couldnt works
i wish i could display an XML file in TextBox or TreeView plz help me out ..