Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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.
Steve

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

Steve:

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.

Devin
 
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
Default

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?

Griff





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.