M
Mark
Here is my aspx code
<%@ Page language="c#" Codebehind="tiptree.aspx.cs" AutoEventWireup="false" Inherits="TipTree.tiptree" %><%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML><HEAD><title>tiptree</title><meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"><meta name="CODE_LANGUAGE" Content="C#"><meta name="vs_defaultClientScript" content="JavaScript"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"></HEAD><body MS_POSITIONING="GridLayout"><form runat="server" ID="Form1"><div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; OVERFLOW: auto; BORDER-LEFT: 1px solid; WIDTH: 210px; BORDER-BOTTOM: 1px solid; HEIGHT: 350px"><ie:treeview runat="server" id="oTree" TreeNodeSrc="state_city.xml"></ie:treeview></div></form></body></HTML
Here is my xml data
<TREENODES><treenode Text="Michigan"><treenode Text="Detroit" /><treenode Text="Farmington" /><treenode Text="Southfield" /></treenode><treenode Text="Washington" ><treenode Text="Bellevue" /><treenode Text="Redmond" /><treenode Text="Woodinville" /></treenode></TREENODES
and here is an error
Server Error in '/tiptree' Application
-------------------------------------------------------------------------------
The data at the root level is invalid. Line 1, position 1.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[XmlException: The data at the root level is invalid. Line 1, position 1.
System.Xml.XmlTextReader.ParseRoot() +29
System.Xml.XmlTextReader.Read() +12
Microsoft.Web.UI.WebControls.TreeView.ReadXmlSrc(String TreeNodeSrc, String TreeNodeXsltSrc, String strOuter) +12
Microsoft.Web.UI.WebControls.TreeView.ReadTreeNodeXmlSrc() +7
Microsoft.Web.UI.WebControls.TreeView.OnInit(EventArgs e) +9
System.Web.UI.Control.InitRecursive(Control namingContainer) +24
System.Web.UI.Control.InitRecursive(Control namingContainer) +17
System.Web.UI.Control.InitRecursive(Control namingContainer) +17
System.Web.UI.Page.ProcessRequestMain() +17
<%@ Page language="c#" Codebehind="tiptree.aspx.cs" AutoEventWireup="false" Inherits="TipTree.tiptree" %><%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML><HEAD><title>tiptree</title><meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"><meta name="CODE_LANGUAGE" Content="C#"><meta name="vs_defaultClientScript" content="JavaScript"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"></HEAD><body MS_POSITIONING="GridLayout"><form runat="server" ID="Form1"><div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; OVERFLOW: auto; BORDER-LEFT: 1px solid; WIDTH: 210px; BORDER-BOTTOM: 1px solid; HEIGHT: 350px"><ie:treeview runat="server" id="oTree" TreeNodeSrc="state_city.xml"></ie:treeview></div></form></body></HTML
Here is my xml data
<TREENODES><treenode Text="Michigan"><treenode Text="Detroit" /><treenode Text="Farmington" /><treenode Text="Southfield" /></treenode><treenode Text="Washington" ><treenode Text="Bellevue" /><treenode Text="Redmond" /><treenode Text="Woodinville" /></treenode></TREENODES
and here is an error
Server Error in '/tiptree' Application
-------------------------------------------------------------------------------
The data at the root level is invalid. Line 1, position 1.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[XmlException: The data at the root level is invalid. Line 1, position 1.
System.Xml.XmlTextReader.ParseRoot() +29
System.Xml.XmlTextReader.Read() +12
Microsoft.Web.UI.WebControls.TreeView.ReadXmlSrc(String TreeNodeSrc, String TreeNodeXsltSrc, String strOuter) +12
Microsoft.Web.UI.WebControls.TreeView.ReadTreeNodeXmlSrc() +7
Microsoft.Web.UI.WebControls.TreeView.OnInit(EventArgs e) +9
System.Web.UI.Control.InitRecursive(Control namingContainer) +24
System.Web.UI.Control.InitRecursive(Control namingContainer) +17
System.Web.UI.Control.InitRecursive(Control namingContainer) +17
System.Web.UI.Page.ProcessRequestMain() +17