P
pbd22
Hi.
How Do I "UPDATE" a previously created string?
I have a problem where an XML string created in
an event handler fails because the string doesn't "UPDATE"
each time the event hanlder fires, but "APPENDS",
creating lots of repetition in the XML:
Quote:
XML Parsing Error: junk after document element
Location: http://localhost:5223/Presentation/set/progress.aspx
Line Number 1, Column 191:<?xml version='1.0' encoding='ISO-8859-1'?
bytessent><filesize>12444894</filesize><percent>0</percent></upload></
uploads><?xml version='1.0' encoding='ISO-8859-1'?> ...
and, the built string inside the event handler method
looks like this:
Code:
Dim sbhtml As New System.Text.StringBuilder
sbhtml.Append("<Some XML Tag>")
etc...
Context.Response.ContentType = "text/xml"
Response.Write(sbhtml.ToString)
So, how do I update the string each time the event handler
fires, not append more xml to the recently created string?
Thanks.
Peter
How Do I "UPDATE" a previously created string?
I have a problem where an XML string created in
an event handler fails because the string doesn't "UPDATE"
each time the event hanlder fires, but "APPENDS",
creating lots of repetition in the XML:
Quote:
XML Parsing Error: junk after document element
Location: http://localhost:5223/Presentation/set/progress.aspx
Line Number 1, Column 191:<?xml version='1.0' encoding='ISO-8859-1'?
<uploads><upload><filename>SomeVideo.gvi</filename><bytessent>0</
bytessent><filesize>12444894</filesize><percent>0</percent></upload></
uploads><?xml version='1.0' encoding='ISO-8859-1'?> ...
and, the built string inside the event handler method
looks like this:
Code:
Dim sbhtml As New System.Text.StringBuilder
sbhtml.Append("<Some XML Tag>")
etc...
Context.Response.ContentType = "text/xml"
Response.Write(sbhtml.ToString)
So, how do I update the string each time the event handler
fires, not append more xml to the recently created string?
Thanks.
Peter