I have a problem with streaming XML
-
Hi, I have a problem with streaming XML. I have created an aspx which return me an xml file format (Type text/xml, Encoding.UTF8). Also now, I try to read this stream in the XmlTextReader but I receive an Error Message when I parse it. And of course, I don't understand that. Could you help me? It is a bit urgent.... Thanks a lot Code Source XmlTextReader XR = new XmlTextReader(Server.MapPath("GenerateXmlTreeView.aspx")); while(!XR.EOF){ XR.ReadElementString(); //Here Thrown exception } Sr.Close(); When I run may aspx 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 '%' character, hexadecimal value 0x25, cannot begin a name. Line 1, position 2. Source Error: Source XML:
-
Hi, I have a problem with streaming XML. I have created an aspx which return me an xml file format (Type text/xml, Encoding.UTF8). Also now, I try to read this stream in the XmlTextReader but I receive an Error Message when I parse it. And of course, I don't understand that. Could you help me? It is a bit urgent.... Thanks a lot Code Source XmlTextReader XR = new XmlTextReader(Server.MapPath("GenerateXmlTreeView.aspx")); while(!XR.EOF){ XR.ReadElementString(); //Here Thrown exception } Sr.Close(); When I run may aspx 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 '%' character, hexadecimal value 0x25, cannot begin a name. Line 1, position 2. Source Error: Source XML:
zoltix wrote: Server.MapPath("GenerateXmlTreeView.aspx") This just returns the path to the "GenerateXmlTreeView.aspx" file on the server. It doesn't execute the code contained in that file or do anything but take the virtual filename and give you the physical path to it. You will probably be better served if you ask this in the ASP.NET forum to find out how to get the output of that page into another page. James "It is self repeating, of unknown pattern" Data - Star Trek: The Next Generation
-
zoltix wrote: Server.MapPath("GenerateXmlTreeView.aspx") This just returns the path to the "GenerateXmlTreeView.aspx" file on the server. It doesn't execute the code contained in that file or do anything but take the virtual filename and give you the physical path to it. You will probably be better served if you ask this in the ASP.NET forum to find out how to get the output of that page into another page. James "It is self repeating, of unknown pattern" Data - Star Trek: The Next Generation