Export Treeview to Array, Save to XML

  • Thread starter Thread starter Jim P.
  • Start date Start date
J

Jim P.

I'm building a Task program. I've got the XMLTextReader working: opening &
parsing the XML files, and propagating the TreeView with nodes & childs.
But I don't know how to export out the contents of the TreeView into an
Array. I then want to take the array and use XMLTextWriter to build an XML
file that will be saved to the local disk.

thanks.
 
Jim,

You can directly use SoapFormatter as mentioned in the following post:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=YETZOKzzBHA.227
6%40cpmsftngxa09

Or you can loop through the root node recursively until you find the children
and serialize it manually.
There is no direct sample available; however, the VB .net code in the following
article will give you some idea although it is exactly opposite of what you
want to do. You will need to work it backward fashion.

308063 HOW TO: Populate a TreeView Control with XML Data in Visual Basic .NET
http://support.microsoft.com/?id=308063

Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 
Back
Top