471,071 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

Populate a treeview with a xml file

Hi,
Im trying to populate my treeview control onmy webpage with the information
that is stored in a xml file, but i cant seem to find any good references
about it. The xml file looks like this.

<root>
<page id="1" name="test1" src="test.htm" />
<page id="2" name="test2" src="test2.htm">
<page id="4" name="test2.1" src="test3.htm">
<page id="9" name="test2.1.1" src="test5.htm" />
</page>
<page id="13" name="test2.2" src="test.htm" />
<page id="11" name="test2.3" src="test.htm">
<page id="51" name="test2.4.1" src="test.htm">
<page id="31" name="test2.4.1.1" src="test.htm">
<page id="661" name="test2.4.1.1.1" src="test.htm" />
</page>
<page id="71" name="test2.4.1.2" src="test.htm" />
<page id="991" name="test2.4.1.3" src="test.htm" />
</page>
</page>
<page id="3" name="test2.5" src="test.htm" />
</page>
<page id="1" name="test3" src="test.htm" />
</root>

The pages can just continue on and on. The result i want in my treeview
control is:

root
-test2
-test2.1
-test2.1.1
-test2.2
-test2.3
-test2.4.1
-test2.4.1.1
-test2.4.1.1.1
-test2.4.1.2
-test2.4.1.3
-test2.5
-test3

Also i am looking to insert a New page... after every node that is closing
like this:

root
-test2
-test2.1
-test2.1.1
New page...
-test2.2
-test2.3
-test2.4.1
-test2.4.1.1
-test2.4.1.1.1
New page...
-test2.4.1.2
-test2.4.1.3
New page...
-test2.5
New page...
-test3
New page...

So when the user press the new page it must send the position in the xml
file that the new page is to be added to, so the program can insert a new
page at that position and save the xml file.

Any good code examples of how to populate a treeview using a xml file?

-Patrick
Jun 15 '06 #1
0 1430

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by T.H.M | last post: by
4 posts views Thread by Mike | last post: by
9 posts views Thread by Marina | last post: by
2 posts views Thread by Dave Wurtz | last post: by
6 posts views Thread by Beginner | last post: by
2 posts views Thread by thanneman | last post: by
reply views Thread by xmail123 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.