Re: Need Help Manipulating Strings (Remove/Replace)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Mar 16, 11:36 am, "Rick Rothstein \(MVP - VB\)"
<rickNOSPAMn...@xxxxxxxxxxxxxxxxx> wrote:
Almost everybody in this newsgroup is using VB6 or lower. While you may get
a stray answer to VB.NET (including VB2003, VB2005 and VB Express which have
dropped .NET from their names) questions here, you should ask them in
newsgroups devoted exclusively to .NET programming (the languages are
different enough to warrant separate newsgroup support). Look for newsgroups
with either the word "dotnet" or "vsnet" in their name.

For the microsoft news server, try these newsgroups for Visual Basic .NET
related questions...

microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb.data

And these for more general .NET questions

microsoft.public.dotnet.general
microsoft.public.vsnet.general

Note: There are many other .NET newgroups (use the first three "fields" from
the last two as templates when searching for them), but the above ones
should get you started.

Rick

"pbd22" <dush...@xxxxxxxxx> wrote in message

news:1174069956.684978.22470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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'?
<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


Thanks Rick.
I didn't realize. I have reposted.
Regards,
Peter

.



Relevant Pages

  • Re: Need Help Manipulating Strings (Remove/Replace)
    ... newsgroups devoted exclusively to .NET programming (the languages are ... How Do I "UPDATE" a previously created string? ... an event handler fails because the string doesn't "UPDATE" ... creating lots of repetition in the XML: ...
    (microsoft.public.vb.general.discussion)
  • Need Help Manipulating Strings (Remove/Replace)
    ... How Do I "UPDATE" a previously created string? ... 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: ...
    (microsoft.public.vb.general.discussion)
  • Need Help Manipulating Strings (Remove/Replace)
    ... How Do I "UPDATE" a previously created string? ... 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: ...
    (microsoft.public.dotnet.general)
  • Need Help Manipulating Strings (Remove/Replace)
    ... How Do I "UPDATE" a previously created string? ... 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: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: SP1 Problem SOAPException doesnt return quote and Umlaute correcty
    ... Our app returns XML in the fault string. ... returned in the fault string of a soap exception. ...
    (microsoft.public.dotnet.framework.webservices)