Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. I have a problem with streaming XML

I have a problem with streaming XML

Scheduled Pinned Locked Moved C#
helpsysadmindata-structuresdebuggingxml
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zoltix
    wrote on last edited by
    #1

    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:

    J 1 Reply Last reply
    0
    • Z zoltix

      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:

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      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

      Z 1 Reply Last reply
      0
      • J James T Johnson

        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

        Z Offline
        Z Offline
        zoltix
        wrote on last edited by
        #3

        thanks -=zoltx=-

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups