Click here to Skip to main content
15,888,113 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using "this" Pin
Leon van Wyk10-Apr-03 2:24
professionalLeon van Wyk10-Apr-03 2:24 
GeneralRemoving the XML heading line in C#. Pin
Segal7-Apr-03 7:20
Segal7-Apr-03 7:20 
GeneralRe: Removing the XML heading line in C#. Pin
Le centriste7-Apr-03 9:23
Le centriste7-Apr-03 9:23 
GeneralRe: Removing the XML heading line in C#. Pin
Heath Stewart7-Apr-03 12:35
protectorHeath Stewart7-Apr-03 12:35 
GeneralMaking an exception class Pin
S O S7-Apr-03 4:57
S O S7-Apr-03 4:57 
GeneralRe: Making an exception class Pin
Andy Smith7-Apr-03 6:30
Andy Smith7-Apr-03 6:30 
GeneralRe: Making an exception class Pin
S O S7-Apr-03 17:29
S O S7-Apr-03 17:29 
GeneralI have a problem with streaming XML Pin
zoltix7-Apr-03 3:01
zoltix7-Apr-03 3:01 
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:

<?xml version="1.0" encoding="utf-8"?>
<treeview title="Licenses Tool">
<custom-parameters>
<param name="shift-width" value="15" />
<param name="img-directory" value="images/" />
</custom-parameters>
<folder title="1999" url="49">
<folder title="Gis Eastern" url="39">
<leaf title="Azerbaijan" url="37" reg="N" />
<leaf title="Belarus" url="20" reg="N" />
<leaf title="Bulgaria" url="21" reg="N" />
<leaf title="Croatia" url="22" reg="N" />
<leaf title="Czech Republic" url="23" reg="N" />
<leaf title="Estonia" url="24" reg="N" />
<leaf title="Hungary" url="25" reg="N" />
<leaf title="Kazakhstan" url="26" reg="N" />
<leaf title="Latvia/Lettonia" url="27" reg="N" />
<leaf title="Lithuania" url="28" reg="N" />
<leaf title="Poland" url="29" reg="N" />
<leaf title="Rumania" url="30" reg="N" />
<leaf title="Russia" url="31" reg="N" />
<leaf title="Slovakia" url="32" reg="N" />
<leaf title="Slovenia" url="33" reg="N" />
<leaf title="Turkey 1" url="38" reg="N" />
<leaf tit


-=zoltx=-
GeneralRe: I have a problem with streaming XML Pin
James T. Johnson7-Apr-03 7:15
James T. Johnson7-Apr-03 7:15 
GeneralRe: I have a problem with streaming XML Pin
zoltix7-Apr-03 9:12
zoltix7-Apr-03 9:12 
GeneralData Authorization Pin
Adam Turner7-Apr-03 0:38
Adam Turner7-Apr-03 0:38 
GeneralRe: Data Authorization Pin
Rocky Moore7-Apr-03 4:53
Rocky Moore7-Apr-03 4:53 
Generalabout to choose .NET vs Borland Pin
Konrad Rotuski7-Apr-03 0:32
Konrad Rotuski7-Apr-03 0:32 
GeneralRe: about to choose .NET vs Borland Pin
Rocky Moore7-Apr-03 5:18
Rocky Moore7-Apr-03 5:18 
GeneralRe: about to choose .NET vs Borland Pin
Konrad Rotuski7-Apr-03 6:03
Konrad Rotuski7-Apr-03 6:03 
GeneralRe: about to choose .NET vs Borland Pin
Rocky Moore8-Apr-03 5:26
Rocky Moore8-Apr-03 5:26 
Generalvirtual parameter Pin
Nick Seng6-Apr-03 22:25
Nick Seng6-Apr-03 22:25 
GeneralRe: virtual parameter Pin
S O S7-Apr-03 5:00
S O S7-Apr-03 5:00 
GeneralRe: virtual parameter Pin
Nick Seng7-Apr-03 16:34
Nick Seng7-Apr-03 16:34 
GeneralRe: virtual parameter Pin
S O S7-Apr-03 17:29
S O S7-Apr-03 17:29 
GeneralRe: virtual parameter Pin
Rocky Moore7-Apr-03 5:24
Rocky Moore7-Apr-03 5:24 
QuestionHow to capture Click events from outside the form? Pin
DavidDunning6-Apr-03 21:49
DavidDunning6-Apr-03 21:49 
AnswerRe: How to capture Click events from outside the form? Pin
codepunk7-Apr-03 11:36
codepunk7-Apr-03 11:36 
GeneralCustom Control at Design Time Pin
Itanium6-Apr-03 21:46
Itanium6-Apr-03 21:46 
GeneralA lot of Sockets Pin
nahumtakum6-Apr-03 12:24
nahumtakum6-Apr-03 12:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.