No se puede mostrar la página XML
No se puede ver la entrada XML con la hoja de estilo . Corrija el error y haga clic en el botón Actualizar, o inténtelo de nuevo más tarde.
--------------------------------------------------------------------------------
El documento XML debe tener un elemento de nivel superior. Error al procesar el recurso
ese, ese el error que me muestra...
este otro es el codigo completo...
<%@ Page language="c#" ContentType="text/xml" AutoEventWireup="false" Codebehind="otro.aspx" %>
<%@ Import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
// Connect to the Database
OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("../bdwine/articulos.mdb"));
// Retrieve the SQL query results and bind it to the Repeater
string SQL_QUERY = "SELECT TOP 5 " +
"FROM tabla1 ORDER BY id DESC";
OleDbCommand myCommand = new OleDbCommand(SQL_QUERY, myConnection);
// bind the results to the Repeater
myConnection.Open();
rptRSS.DataSource = myCommand.ExecuteReader();
rptRSS.DataBind();
myConnection.Close();
}
protected string FormatForXML(object input)
{
string data = input.ToString(); // cast the input to a string
// replace those characters disallowed in XML documents
data = data.Replace("&", "&");
data = data.Replace("\"", """);
data = data.Replace("'", "'");
data = data.Replace("<", "<");
data = data.Replace(">", ">");
return data;
}
</script>
<asp:Repeater id="rptRSS" runat="server">
<HeaderTemplate>
<rss version="2.0">
<channel>
<title>ASP.NET News!</title>
<link>http://www.ASPNETNews.com/Headlines/</link>
<description>
This is the syndication feed for ASPNETNews.com.
</description>
</HeaderTemplate>
<ItemTemplate>
<item>
<title><%# FormatForXML(DataBinder.Eval(Container.DataItem,"T itulo")) %></title>
<description>
<%# FormatForXML(DataBinder.Eval(Container.DataItem,"C opete")) %>
</description>
<link>
http://www.ASPNETNews.com/Story.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "id") %>
</link>
<author><%# FormatForXML(DataBinder.Eval(Container.DataItem,"f oto")) %></author>
<pubDate>
<%# String.Format("{0:R}",
DataBinder.Eval(Container.DataItem, "fecha")) %>
</pubDate>
</item>
</ItemTemplate>
<FooterTemplate>
</channel>
</rss>
</FooterTemplate>
</asp:Repeater>