& > &
& > &
& > &
& > &
& > &
& > & & > & & > & & > & & > & & > & & > & & > &
& > & & > &
& > &
Go Back  Xtreme Visual Basic Talk > > > & > &


Reply
 
Thread Tools Display Modes
  #1  
Old 06-04-2010, 01:17 AM
kochesag kochesag is offline
Newcomer
 
Join Date: May 2010
Posts: 4
Default & > &


Hi everybody,
I am so sorry if this is a very newbie question but I need help in this field as my search didn't return good results.
I am creating/writing a XML document but using a string builder!!!
Everything is alright and working great but one thing: I noticed that fields that contains special characters like & will cause the whole XML document to corrupt!
So I found that I need to change & with & in my document.
There are 2 questions now:

1. Using String.Replace is the best way to do so? Is there a better function for this in .NET framework?
2. What about other special characters I don't know about?

Thank you
Reply With Quote
  #2  
Old 06-04-2010, 02:57 AM
PlausiblyDamp's Avatar
PlausiblyDamp& > & PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Is there a reason you are using string builder as opposed to one of the various xml related classes in .Net?

XmlWriter, XmlDocument or XmlSerializer would probably be a lot easier in the long run.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
& > &
& > &
& > & & > &
& > &
& > &
& > & & > & & > & & > & & > & & > & & > &
& > &
& > &
 
& > &
& > &
 
-->