Click here to Skip to main content
15,886,603 members
Articles / Desktop Programming / Windows Forms

Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader

Rate me:
Please Sign up or sign in to vote.
4.74/5 (56 votes)
17 Feb 2006CPOL4 min read 230.7K   15.1K   133  
Demonstrates how to serialize and de-serialize the contents of System.Windows.Forms.TreeView control from an XML file using forward only, non-cached XmlTextReader and XmlTextWriter.
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeViewSerialization", "TreeViewSerialization.csproj", "{692E9844-1F3D-4303-887A-682373748E58}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		Debug = Debug
		Release = Release
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{692E9844-1F3D-4303-887A-682373748E58}.Debug.ActiveCfg = Debug|.NET
		{692E9844-1F3D-4303-887A-682373748E58}.Debug.Build.0 = Debug|.NET
		{692E9844-1F3D-4303-887A-682373748E58}.Release.ActiveCfg = Release|.NET
		{692E9844-1F3D-4303-887A-682373748E58}.Release.Build.0 = Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Arab Emirates United Arab Emirates

Comments and Discussions