Export Treeview to Array, Save to XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim P.

    #1

    Export Treeview to Array, Save to XML

    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.


  • Bharat Patel [MSFT]

    #2
    RE: Export Treeview to Array, Save to XML

    Jim,

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


    6%40cpmsftngxa0 9

    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.

    Comment

    Working...