help with saving from a class to an xml file
I'm looking for help with saving from a class to an XML file example- name of class is "Contacts" and I'm having a hard time with the coding for a "Public function Save" I can create the file but cant save to it what I've been trying
just rewrites the information that was already there. I need to pull the information from a class to a save button.
If anyone could help me with the coding it would be great.
I actually didn't get your question. But I think that you want to update the Existing XML file with data. If that is the case
Take down my coding
Set xmldoc = CreateObject("MSXML.DomDocument")
If xmldoc.Load("F:\del\t5.xml") Then
Set root = xmldoc.documentElement
'Set e = IXMLDOMElement
'Set nd = IXMLDOMNode
'nd.BaseName = "india"
'nd.Text = "this is our country"
Set e = xmldoc.createElement("xml")
e.Text = "extensible markup language"
If you want to serialise an object which is an instance of a class
XmlSerializer xs = new XmlSerializer(typeof(<NameSpace.ClassName>));
StreamWriter xw = new StreamWriter(<completefilenamewithpath>, false);
Last Post: 08-23-2001, 04:47 PM
Last Post: 01-03-2001, 10:40 AM
Last Post: 12-09-2000, 11:50 PM
By CHRISTOS STAVRINOU in forum Database
Last Post: 11-16-2000, 04:56 PM
Last Post: 08-18-2000, 11:13 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL