BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


.NET and XML
.Net, COM Interoperability and Word Object Model
WS-Routing for .NET endpoints
Using XML and XSLT in VB.NET Jeopardy
Symmetric Encryption/Decryption with .NET
XInclude.NET 1.0
EXSLT.NET 1.0
How to read a XML file using XmlTextReader?
How to compare a XML element with XmlTextReader?
How to verify if an element is empty with XmlTextReader and IsEmptyElement?
How to check if the XML elements contains any attributes with XmlTextReader
How to avoid to read the XML declaration with XmlTextReader?
How to create a XML file with XmlTextWriter?
Is it possible to add attributes with XmlTextWriter?
How to Write a Comment to a XML File with XmlTextWriter and WriteComment?
How to add the XML Declaration with XmlTextWriter and WriteStartDocument?
How to use Indentation in XmlTextWriter?
What is the usage of WriteFullEndElement and how do I use?
How to include a CData block with XmlTextWriter and WriteCData?
How to write raw XML with XmlTextWriter?
How to add a namespace with the XmlTextWriter and WriteStartAttribute?


 
 

<< XSLT 


By Kirk Allen Evans
First Posted 08/28/2002
Times viewed 254

Output a directory as XML using .NET


This post contains attachments
v20020828132149.zip 

Summary This sample shows how to iterate over a directory and create an XML document using the System.Xml.XmlTextWriter in .NET. It is instantiated as a console application and creates an XML file in the local executable's directory.

This sample shows how to iterate over a directory and create an XML document using the System.Xml.XmlTextWriter in .NET. It is instantiated as a console application and creates an XML file in the local executable's directory.
The current implementation is a Console C# application class, and can be compiled with the following command-line:
csc /t:exe /out:dirtoxml.exe dirtoxml.cs
Once the console application is run, it will generate an XML file in the directory it is executed from.

Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XSLT 





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML