|
Location: Desktop development - Visual Basic . NET License: The Intelliproject Open License (IPOL) Create an XML file with VB.NETPosted by Manu AbrahamDescribe how to create an XML file with VB.NET |
Skill: BeginnerPosted: 02/12/2008Views: 1618Rating: 0.00 /5Popularity: 0.00 |
| Sign Up to vote for this article |
To create an XML file using VB.NET, we need to use the XmlWriter or XmlTextWriter classes.
The XmlTextWriter class is derived from XmlWriter class, which represents a writer that provides fast non-cached forward-only way of generating XML documents based on the W3C Extensible Markup Language (XML) 1.0 specification.
In this article, I will show you how to use XmlWriter class to create an XML document and write data to the document.
The XmlWriter class belongs to the 'System.xml' Namespace.So we need to import the particular namespace using the following line in our script.
Imports System.xml
The create method allows you to specify the features to support on the created XmlWriter using XmlWriterSettings. This settings class has options for indentation, new lines, encoding and XML conformance level.
The above code will create the xml file named 'xmlfile.xml' on drive "C" and will looks like the following:
Please forward your queries and suggestions to:
manu@phppals.net
manu@manuabraham.info
http://manuabraham.info
This article, along with any associated source code and files, is licensed under The Intelliproject Open License (IPOL)
| Manu Abraham
| Manu Abraham having an experience of more than 3 years in PHP-MySQL web development. Location: |
Sign up to post message on the article message board!