MDI data storage in XML
-
Hello Everyone, I have developed a simple MDI forms application and am now stuck with a problem. I want to store the data of each childform in a seperate tag of an XML file. I have written a xml_write() method in the childform.cs but am not able to successfully write for each MDI childform. Can I get some help!! KR
-
Hello Everyone, I have developed a simple MDI forms application and am now stuck with a problem. I want to store the data of each childform in a seperate tag of an XML file. I have written a xml_write() method in the childform.cs but am not able to successfully write for each MDI childform. Can I get some help!! KR
-
You'll have to be more specific, what happens when your write function is called? are any exceptions thrown? Maybe show some code?? If you don't give details then no one can help you:-D Kev
I have attached the code of the method I have written in the ChildForm.cs file but this is not the right code coz I am not able to append nodes to the XML file using this. My problem - I want to add a node with some text to the XML file whenever I open a new child window using normal MDI property. private void Xml_Creation(int count) { XmlWrt = new XmlTextWriter("XMLSample.xml",null); XmlWrt.Formatting=System.Xml.Formatting.Indented; XmlWrt.WriteStartDocument(); //start the first element. XmlWrt.WriteStartElement("FORMS"); //create our first customer element. //this is a child element of the customers element. XmlWrt.WriteStartElement("Form"); XmlWrt.WriteElementString("FormNumber", count.ToString()); XmlWrt.WriteEndElement(); //XmlWrt.WriteEndDocument(); //XmlWrt.Flush(); XmlWrt.Close(); } Cheers KR