XML解析错误:未找到元素 
位置:http://localhost:1117/HomeWork01/Survey.aspx 
行:1,列:1:这个错误怎么解决,自己查看了一下页面(Survey.aspx)觉得没有问题呀大家有没有碰到过,怎么解决

解决方案 »

  1.   

    贴码吧。
    你的survey是如何引用的xml?
      

  2.   

    我压根就没有引用XML,只是个aspx网页,就出现了这样的结果
      

  3.   


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Survey.aspx.cs" Inherits="Survey" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <style type="text/css">
            .style1
            {
                width: 99%;
            }
            .style2
            {
                width: 157px;
            }
            .style3
            {
            }
            .style4
            {
                width: 315px;
            }
        </style>
        <script type="text/javascript" language="javascript">
          
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <table style="width: 860px">
                <tr>
                    <td colspan="4">
                        <table style="width: 100%">
                            <tr>
                                <td align="center" colspan="1" style="width:150px;">
                                    &nbsp;</td>
                                <td colspan="4" align="left">
                                    <h1>Adventure Works</h1>
                                 </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" valign="top">
                        <table style="width: 100%">
                            <tr>
                                <td style="width: 150px; height: 18px">
                                    &nbsp;</td>
                                <td colspan="2" >
                                    &nbsp;<a href="default.aspx">主页</a> &nbsp;<a href="Diagnostics.aspx">诊断</a> &nbsp; <a href="About.aspx">关于我们</a> &nbsp; <a href="Contact.aspx">联系我们</a> &nbsp; <a href="Feedback.aspx">反馈信息</a> &nbsp; <a href="Survey.aspx">在线调查</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
        </table>
        <div>
            <h1>请填写您的基本信息</h1>
            <table class="style1">
                <tr>
                    <td class="style2">
                        姓名*</td>
                    <td class="style4">
                        <asp:TextBox ID="TextBox_name" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ErrorMessage="姓名必须填写" ForeColor="Red" ControlToValidate="TextBox_name"></asp:RequiredFieldValidator>
                    </td>
                    <td rowspan="14">
                        <asp:Calendar ID="Calendar_LastTravel" runat="server" 
                            onselectionchanged="Calendar_LastTravel_SelectionChanged"></asp:Calendar>
                        <asp:Calendar ID="Calendar_Willtravel" runat="server" Visible="False"></asp:Calendar>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        出生年月*<br />
                    </td>
                    <td class="style4">
                        <asp:TextBox ID="TextBox_Birth" runat="server"></asp:TextBox>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ErrorMessage="请正确填写出生日期" ForeColor="Red" ControlToValidate="TextBox_Birth" 
                            Type="Date"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Email<br />
                    </td>
                    <td class="style4">
                        <asp:TextBox ID="TextBox_Email" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                            ErrorMessage="不符合邮件格式!" ForeColor="Red" ControlToValidate="TextBox_Email" 
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        车龄<br />
                    </td>
                    <td class="style4">
                        <asp:TextBox ID="TextBox_Age" runat="server"></asp:TextBox>
                        <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="在0到100之间" 
                            ForeColor="Red" ControlToValidate="TextBox_Age" MaximumValue="100" 
                            MinimumValue="0"></asp:RangeValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        最后一次旅行日期</td>
                    <td class="style4">
                        <asp:TextBox ID="TextBox_lasttravel" runat="server" ReadOnly="True"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        将要旅行日期</td>
                    <td class="style4">
                        <asp:TextBox ID="TextBox_willtravel" runat="server" ReadOnly="True"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        骑自行的能力</td>
                    <td class="style4">
                        <asp:RadioButton ID="radion_junior" runat="server" Checked="True" 
                            GroupName="Ability" Text="初学者" />
                        <asp:RadioButton ID="radion_senior" runat="server" GroupName="Ability" 
                            Text="有一定经验" />
                        <asp:RadioButton ID="radion_pro" runat="server" GroupName="Ability" Text="专家" />
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        经验</td>
                    <td class="style4">
                        <asp:DropDownList ID="DDList_Expe" runat="server">
                            <asp:ListItem>仅在公路骑驶</asp:ListItem>
                            <asp:ListItem>在森林防火带骑驶</asp:ListItem>
                            <asp:ListItem>单行道骑驶</asp:ListItem>
                            <asp:ListItem>山地骑驶</asp:ListItem>
                            <asp:ListItem>赢得山地竞赛</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        目标</td>
                    <td class="style4">
                        <table class="style1">
                            <tr>
                                <td class="style3">
                                    <asp:CheckBox ID="CheckBox1" runat="server" Text="得到更多公路自行车骑驶经验" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    <asp:CheckBox ID="CheckBox2" runat="server" Text="得到更多山地自行车骑驶经验" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    <asp:CheckBox ID="CheckBox3" runat="server" Text="升级我的自行车" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    <asp:CheckBox ID="CheckBox4" runat="server" Text="得到最新的配件" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        联系方式</td>
                    <td class="style4">
                        <asp:DropDownList ID="DDList_Contact" runat="server">
                            <asp:ListItem>不要给我发送销售信息</asp:ListItem>
                            <asp:ListItem>仅发送来自Adventure Works的销售消息</asp:ListItem>
                            <asp:ListItem>发送我感兴趣的任何销售信息</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Button ID="btn_confirm" runat="server" PostBackUrl="~/SurveyReceipt.aspx" 
                            Text="确认" onclick="btn_confirm_Click" />
                    </td>
                    <td class="style4">
                        &nbsp;</td>
                </tr>
            </table>
        
        </div>
        </form>
    </body>
    </html>
      

  4.   

    page.ClientScript.RegisterStartupScript(page.GetType(), "", "<script type=\"text/javascript\" defer>" + script + "</script>");当使用RegisterStartupScript这种方式向页面注册脚本时,请不要使用Response.End();