TreeView and XML

woodhzbs

New Member
I want to use XML and XSL to populate a TreeView. This is the markup for the<BR>TreeView element:<BR><BR><iewc:treeview id="tree1" runat="server"<BR>TreeNodeSrc=http://aspmessageboard.com/archive/index.php/"http://localhost/myxml/xmltest/menus2.xml"<BR>TreeNodeXsltSrc="http://localhost/myxml/xmltest/menus2.xsl"></iewc:treeview><BR><BR>The menus2.xml file contains the following:<BR><BR><?xml version="1.0" ?><BR><root xmlns:sql="urn:schemas-microsoft-com:xml-sql" sql:xsl="menus2.xsl"><BR><sql:query><BR>select * from menus for xml auto<BR></sql:query><BR></root><BR><BR>The menus2.xsl file contains the following:<BR><BR><?xml version="1.0"?><BR><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<BR>version="1.0"><BR><BR><xsl:template match="/"><BR><TREENODES><BR><xsl:apply-templates select="root/menus[not(@parentID)]"/><BR></TREENODES><BR></xsl:template><BR><BR><xsl:template match="menus"><BR><xsl:variable name="ID" select="@menuID"/><BR><treenode><BR><xsl:attribute name="Text"><xsl:value-of select="@Title"/></xsl:attribute><BR><xsl:attribute name="NavigateURL"><xsl:value-of<BR>select="@URL"/></xsl:attribute><BR><xsl:attribute name="Target" >main</xsl:attribute><BR><xsl:apply-templates select="//menus[@parentID=$ID]"/><BR></treenode><BR></xsl:template><BR><BR></xsl:stylesheet><BR><BR><BR>I have created a virtual directory with IIS Virtual Directory Managment for<BR>SQL Server with the name myxml with the local path to the directory that<BR>contains menus2.xml and menus2.xsl. Furthermore I have defined a virtual<BR>name under the Virtual Names tab with the name xmltest and the type template<BR>and the same path as above. When I go to<BR>http://localhost/myxml/xmltest/menus2.xml in IE I get the correct XML. But<BR>when I try to Build and Browse my .aspx-file the TreeView is empty!<BR><BR>Why is it empty?<BR><BR>Anybody? Please..
 
Back
Top