错误提示:(大家都试试看)
无法显示 XML 页。 
使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。 
--------------------------------------------------------------------------------Prolog 外部不能有 DOCTYPE 声明。处理资源 'http://localhost/Flash_DotNet/datagrid.aspx' 时出错。第 20 行,位置: 11 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^

解决方案 »

  1.   

    Response.Clear()
    Response.Write(ds.GetXmlSchema().ToString());
    Response.End();
      

  2.   

    Response.Write(ds.GetXmlSchema().ToString());是输出DS的架构文件的XML。应该没有问题的。你简单的写一个页面只输出这个内容看原文件是什么内容并贴出来
      

  3.   

    Response.Clear();
    Response.Write(ds.GetXmlSchema().ToString());
    Response.End();
      

  4.   

    对不起,我想要的是DataSet中的数据的XML显示格式,不要Schema中的内容,而:
    Response.Write(ds.GetXml());显示的是一般的文本,不是XML,你们可以试一下.
      

  5.   

    我要不得是输出:
    <?xml version="1.0" encoding="utf-8" ?> 
    - <NewDataSet>
    - <Table diffgr:id="Table1" msdata:rowOrder="0">
      <CustomerID>ALFKI</CustomerID> 
      <CompanyName>Alfreds Futterkiste</CompanyName> 
      <ContactName>Maria Anders</ContactName> 
      <ContactTitle>Sales Representative</ContactTitle> 
      </Table>
    - <Table diffgr:id="Table2" msdata:rowOrder="1">
      <CustomerID>ANATR</CustomerID> 
      <CompanyName>Ana Trujillo Emparedados y helados</CompanyName> 
      <ContactName>Ana Trujillo</ContactName> 
      <ContactTitle>Owner</ContactTitle> 
      </Table>
    - <Table diffgr:id="Table3" msdata:rowOrder="2">
      <CustomerID>ANTON</CustomerID> 
      <CompanyName>Antonio Moreno Taquería</CompanyName> 
      <ContactName>Antonio Moreno</ContactName> 
      <ContactTitle>Owner</ContactTitle> 
      </Table>
    - <Table diffgr:id="Table4" msdata:rowOrder="3">
      <CustomerID>AROUT</CustomerID> 
      <CompanyName>Around the Horn</CompanyName> 
      <ContactName>Thomas Hardy</ContactName> 
      <ContactTitle>Sales Representative</ContactTitle> 
      </Table>
    - <Table diffgr:id="Table5" msdata:rowOrder="4">
      <CustomerID>BERGS</CustomerID> 
      <CompanyName>Berglunds snabbk&ouml;p</CompanyName> 
      <ContactName>Christina Berglund</ContactName> 
      <ContactTitle>Order Administrator</ContactTitle> 
      </Table>
    </NewDataSet>
    最好是将:<?xml version="1.0" encoding="utf-8" ?> 
    改成:<?xml version="1.0" encoding="GB-2312" ?> 
      

  6.   

    明白了:
    Response.ContentType = "text/xml";
    Response.Expires = -1;
    Response.Write("<?xml version='1.0' encoding='GB2312'?>");
    Response.Clear();
    Response.Write(ds.GetXml().ToString());
    Response.End();
      

  7.   

    Response.Clear()
    Response.Write(ds.GetXml().ToString());
    Response.End();
      

  8.   

    Response.ContentType = "text/xml";
    Response.Expires = -1;
    Response.Clear();
    Response.Write("<?xml version='1.0' encoding='GB2312'?>");
    Response.Write(ds.GetXml().ToString());
    Response.End();
      

  9.   

    Response.ContentType = "text/xml";
    Response.Expires = -1;
    Response.Clear();
    Response.Write("<?xml version='1.0' encoding='GB2312'?>");
    Response.Write(ds.GetXml().ToString());
    Response.End();