Search:
Namespaces
Discussions
.NET v1.1
Feedback
Bizarre TreeView Control Error
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngwebcontrols' list
.
Scott Sargent
-- Copied from [aspngxml] to [aspngwebcontrols] by devin <
Click here to reveal e-mail address
> --
I'm getting this error when trying to use the MS IE Treeview controls. Has
anyone seen it before? I can post the code if needed but Quote doesn't
appear anywhere near my xml or xsl that powers the treeview control. I'm
using a page thats got the asp:xml control on it to transform the xml to the
treeview schema.
Server Error in '/' Application.
----------------------------------------------------------------------------
----
This is an unexpected token. Expected 'QUOTE'. Line 2, position 63.
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: This is an unexpected token.
Expected 'QUOTE'. Line 2, position 63.
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: This is an unexpected token. Expected 'QUOTE'. Line 2,
position 63.]
System.Xml.Schema.DtdParser.ParseExternalID() +900
System.Xml.Schema.DtdParser.ParseDocTypeDecl() +347
System.Xml.Schema.DtdParser.Parse() +61
System.Xml.
XmlTextReader
.ParseDtd(XmlScanner scanner) +71
System.Xml.
XmlTextReader
.ParseTag() +1442
System.Xml.
XmlTextReader
.ParseRoot() +234
System.Xml.
XmlTextReader
.Read() +127
System.Xml.
XmlReader
.MoveToContent() +75
System.Xml.
XmlReader
.IsStartElement(String name) +15
Microsoft.Web.UI.WebControls.
TreeView
.ReadXmlSrc(String TreeNodeSrc,
String TreeNodeXsltSrc, String strOuter) +180
Microsoft.Web.UI.WebControls.
TreeView
.ReadTreeNodeXmlSrc() +80
Microsoft.Web.UI.WebControls.
TreeView
.OnInit(
EventArgs
e) +90
System.Web.UI.
Control
.InitRecursive(
Control
namingContainer) +234
System.Web.UI.
Control
.InitRecursive(
Control
namingContainer) +178
System.Web.UI.
Control
.InitRecursive(
Control
namingContainer) +178
System.Web.UI.
Page
.ProcessRequestMain() +171
Reply to this message...
James Avery
This is caused by data in your treeview containing an unescaped "
character. Like value="He was "crazy" "
Try using the html escape character " instead of ". (Run a replace
if needed)
Thanks,
James Avery
----Original Message-----
From: Scott Sargent [mailto:
Click here to reveal e-mail address
]
Sent: Monday, May 06, 2002 10:36 AM
To: aspngwebcontrols
Subject: [aspngwebcontrols] Bizarre
TreeView
Control
Error
-- Copied from [aspngxml] to [aspngwebcontrols] by devin
<
Click here to reveal e-mail address
> --
I'm getting this error when trying to use the MS IE Treeview controls.
Has anyone seen it before? I can post the code if needed but Quote
doesn't appear anywhere near my xml or xsl that powers the treeview
control. I'm using a page thats got the asp:xml control on it to
transform the xml to the treeview schema.
Server Error in '/' Application.
------------------------------------------------------------------------
----
----
This is an unexpected token. Expected 'QUOTE'. Line 2, position 63.
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: This is an unexpected token.
Expected 'QUOTE'. Line 2, position 63.
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: This is an unexpected token. Expected 'QUOTE'. Line 2,
position 63.]
System.Xml.Schema.DtdParser.ParseExternalID() +900
System.Xml.Schema.DtdParser.ParseDocTypeDecl() +347
System.Xml.Schema.DtdParser.Parse() +61
System.Xml.
XmlTextReader
.ParseDtd(XmlScanner scanner) +71
System.Xml.
XmlTextReader
.ParseTag() +1442
System.Xml.
XmlTextReader
.ParseRoot() +234
System.Xml.
XmlTextReader
.Read() +127
System.Xml.
XmlReader
.MoveToContent() +75
System.Xml.
XmlReader
.IsStartElement(String name) +15
Microsoft.Web.UI.WebControls.
TreeView
.ReadXmlSrc(String TreeNodeSrc,
String TreeNodeXsltSrc, String strOuter) +180
Microsoft.Web.UI.WebControls.
TreeView
.ReadTreeNodeXmlSrc() +80
Microsoft.Web.UI.WebControls.
TreeView
.OnInit(
EventArgs
e) +90
System.Web.UI.
Control
.InitRecursive(
Control
namingContainer) +234
System.Web.UI.
Control
.InitRecursive(
Control
namingContainer) +178
System.Web.UI.
Control
.InitRecursive(
Control
namingContainer) +178
System.Web.UI.
Page
.ProcessRequestMain() +171
| [aspngwebcontrols] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngwebcontrols.asp
= JOIN/QUIT
Reply to this message...
Scott Sargent
Here's my source code:
<SOURCE_CODE>
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@
Page
language="C#" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>IETreeView</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="
http://schemas.microsoft.com/intellisense/ie5"
;
name="vs_targetSchema">
<link rel="stylesheet" href="/style/aspx_master.css" type="text/css">
</HEAD>
<body MS_POSITIONING="GridLayout" bgcolor="navy">
<font face="Verdana" color="white">
<form id="IETreeView" method="post" runat="server">
<iewc:TreeView id="TreeView1"
DEFAULTSTYLE="font-family:verdana;color:white;" runat="server"
TreeNodeSrc="xslvoodoo.aspx" />
</form>
</font>
</body>
</HTML>
</SOURCE_CODE>
The odd thing that I'm finding is that if i go to the xml page directly
(xslvoodo.aspx) i can see the xml it renders nicely and appears to be
correct. I can then save that off in a separate file and pass that filename
to the ie treeview control and poof it works. But it won't work if i pull
it from the aspx page. I've got the content type and character set on the
aspx page. Any ideas?
here's the xml
<?xml version="1.0" encoding="utf-8" ?>
<TREENODES>
<TREENODE Text="Knowledgebase"
NavigateUrl="/protected/nav/router.aspx?ItemId=1015">
<TREENODE Text="User Journal Tool"
NavigateUrl="/protected/nav/router.aspx?ItemId=1019">
<TREENODE Text="User Journal Tools"
NavigateUrl="/protected/nav/router.aspx?ItemId=1034">
</TREENODE>
<TREENODE Text="User Journal Pages"
NavigateUrl="/protected/nav/router.aspx?ItemId=1035">
<TREENODE Text="codeboy"
NavigateUrl="/protected/nav/router.aspx?ItemId=1023">
</TREENODE>
<TREENODE Text="athena"
NavigateUrl="/protected/nav/router.aspx?ItemId=1025">
</TREENODE>
<TREENODE Text="codemonkey"
NavigateUrl="/protected/nav/router.aspx?ItemId=1032">
</TREENODE>
<TREENODE Text="sqlfish"
NavigateUrl="/protected/nav/router.aspx?ItemId=1033">
</TREENODE>
<TREENODE Text="jdixon"
NavigateUrl="/protected/nav/router.aspx?ItemId=1038">
</TREENODE>
<TREENODE Text="mwittman"
NavigateUrl="/protected/nav/router.aspx?ItemId=1039">
</TREENODE>
<TREENODE Text="ssmagic"
NavigateUrl="/protected/nav/router.aspx?ItemId=1040">
</TREENODE>
</TREENODE>
</TREENODE>
<TREENODE Text="Technology"
NavigateUrl="/protected/nav/router.aspx?ItemId=1036">
<TREENODE Text="ASP.NET "
NavigateUrl="/protected/nav/router.aspx?ItemId=1016">
</TREENODE>
<TREENODE Text=".NET"
NavigateUrl="/protected/nav/router.aspx?ItemId=1017">
</TREENODE>
<TREENODE Text="SSMAGIC.COM"
NavigateUrl="/protected/nav/router.aspx?ItemId=1018">
</TREENODE>
</TREENODE>
<TREENODE Text="Life & Liesure"
NavigateUrl="/protected/nav/router.aspx?ItemId=1037">
</TREENODE>
</TREENODE>
</TREENODES>
[Original message clipped]
Reply to this message...
System.EventArgs
System.Web.UI.Control
System.Web.UI.Page
System.Windows.Forms.TreeView
System.Xml.XmlException
System.Xml.XmlReader
System.Xml.XmlTextReader
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com