Creating Elements and Attributes
The most common items found in an XML document include elements and attributes. When creating a new XML document, the basic idea is that you instantiate a new System.Xml.XmlDocument object in memory and add instances of System.Xml.XmlElement to the document object. For each element, you can also define attributes that are represented as System.Xml.XmlAttribute object.
XmlElement objects can be added as children to other XmlElement objects, resulting in a nested structure. The final XML document contains data based on the code that generated the XML. This is typically dependant on the type of XML content your application is creating.
To show how this works exactly, create a new Console application project and add ...
Get Visual Basic® .NET by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.