Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 5th, 2005, 12:00 PM
Registered User
Join Date: May 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML from SQL for TreeView

I hope someone can help.
I want to present information stored in an SQL table in a TreeView. Using code similar to Listings 13-14 or 13-21, I've been able to generate XML in the format I want. What I cannot figure out, however, is how to write the XML to a file that can be consumed by the tree view.
I'm fairly new to this, so please forgive my ignorance, if I'm missing something simple.
Thanks in advance for your suggestions.

  #2 (permalink)  
Old December 22nd, 2005, 06:07 PM
Wrox Author
Join Date: Dec 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts


There are several options or writing XML depending on what objects you are using. If you are using an XmlDocument object, there is a Save method that lets you save the XML to a file. If you simply have the XML stored in a string then you can use one of the Writer objects available in .NET (XmlTextWriter, StreamWriter, etc).

Chapter 22 has a bunch of information on using the classes in the System.IO space to write data to the disk.

  #3 (permalink)  
Old February 13th, 2006, 01:01 PM
Registered User
Join Date: Feb 2006
Location: Cambridge, Cambridgeshire, United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Steve / Devin

It seems to me that writing the XML to disk and then loading it into a tree-view seems rather a slow process; far better if it would data-bind to an XML stream returned from a procedure.

Is this possible?



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relational SQL Data to XML - Vet SQL/ASP - New XML JimiTheJett XML 1 December 4th, 2008 06:06 PM
XML from SQL for TreeView srgibson99 ASP.NET 2.0 Basics 0 December 6th, 2005 12:30 PM
problem in treeview using xml,xslt. jyoti_khera XSLT 3 October 18th, 2004 11:29 PM
Treeview Control and Xml Casanova1 Pro VB.NET 2002/2003 0 January 9th, 2004 09:30 PM

All times are GMT -4. The time now is 12:57 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.