Hello,
I create a xml file like this:
Dim objXMLDocument As New XmlDocument()
Dim objXmlNode As XmlNode
Dim objXmlElement As XmlElement
objXmlNode = objXMLDocument. CreateXmlDeclar ation("1.0", "UTF-8", Nothing)
objXMLDocument. AppendChild(obj XmlNode)
objXmlElement = objXMLDocument. CreateElement(" RootTag")
objXMLDocument. AppendChild(obj XmlElement)
REM Add class data to XML file.
objXMLDocument. Save("Employees .xml")
Suppose you have a class TestClass. How does one use
'System.Xml.Ser ialization' functionality to put the data of that class into
that XML file, inside the <RootTag>? Or is it only possible to serialize a
class to a new file?
Thanks.
I create a xml file like this:
Dim objXMLDocument As New XmlDocument()
Dim objXmlNode As XmlNode
Dim objXmlElement As XmlElement
objXmlNode = objXMLDocument. CreateXmlDeclar ation("1.0", "UTF-8", Nothing)
objXMLDocument. AppendChild(obj XmlNode)
objXmlElement = objXMLDocument. CreateElement(" RootTag")
objXMLDocument. AppendChild(obj XmlElement)
REM Add class data to XML file.
objXMLDocument. Save("Employees .xml")
Suppose you have a class TestClass. How does one use
'System.Xml.Ser ialization' functionality to put the data of that class into
that XML file, inside the <RootTag>? Or is it only possible to serialize a
class to a new file?
Thanks.