|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
i'm writing a composite control in ASP.Net within which i want to display
the contents of an xml file. i want to be able to view the xml 2 different ways - as straight text and as a treeview (the way IE displays the file when it is double-clicked on). the text view is pretty simple - just use a multiline textbox w/wrap=true and read the file in. what i can't figure out is how to display the xml in a treeview. i originally thought of using a browser control (AxInterop.SHDocVw) but apparently, this is only available for windows forms based applications. anybody have any ideas on how to display xml as a tree just like IE does? SilentCry wrote:
> i'm writing a composite control in ASP.Net within which i want to Oleg Tkachenko's eXml control http://www.xmllab.net/downloads/exml/ has > display the contents of an xml file. i want to be able to view the xml 2 > different ways - as straight text and as a treeview (the way IE displays > the file when it is double-clicked on). the text view is pretty simple - > just use a multiline textbox w/wrap=true and read the file in. what i > can't figure out is how to display the xml in a treeview. i originally > thought of using a browser control (AxInterop.SHDocVw) but apparently, > this is only available for windows forms based applications. > anybody have any ideas on how to display xml as a tree just like IE does? a setting to pretty print the source of an XML document. It's based on an XSLT stylesheet that is then applied using System.Xml.Xsl.XslCompiledTransform. So you could either use that eXml control directly or have a look at its source to use the stylesheet and XslCompiledTransform yourself. "SilentCry" <silentc***@sbcglobalX.net> wrote in message Hi,news:eAfVyPdvJHA.1492@TK2MSFTNGP03.phx.gbl... > i'm writing a composite control in ASP.Net within which i want to display > the contents of an xml file. i want to be able to view the xml 2 different > ways - as straight text and as a treeview (the way IE displays the file > when it is double-clicked on). the text view is pretty simple - just use a > multiline textbox w/wrap=true and read the file in. what i can't figure > out is how to display the xml in a treeview. i originally thought of using > a browser control (AxInterop.SHDocVw) but apparently, this is only > available for windows forms based applications. > anybody have any ideas on how to display xml as a tree just like IE does? As mentioned in the previous post You can transform the xml with an xslt. To get the one IE7 uses type res://msxml.dll/DEFAULTSS.xsl in the address bar in IE7. -Zsolt
Best practice ASP SQL
Specifying property defaults how to pass the current user with reportviewer control ASP.NET equivelant for include files that won't cause problems Control is not showing inherited properties in property grid Programmatically add textbox control with incrementing id Is here a web control to create tasks/calendars in Outlook ? Treeview Databinding Filling the text of Buttons over a public class TreeNode Control with 2 links for each element |
|||||||||||||||||||||||