Click here to Skip to main content
15,885,941 members
Home / Discussions / C#
   

C#

 
QuestionSystem.Drawing.Image to IPicture and back changes the image Pin
Sander123432117-Jun-09 0:09
Sander123432117-Jun-09 0:09 
AnswerRe: System.Drawing.Image to IPicture and back changes the image Pin
Henry Minute17-Jun-09 1:24
Henry Minute17-Jun-09 1:24 
QuestionSQL Data type validation Pin
jonhbt16-Jun-09 23:49
jonhbt16-Jun-09 23:49 
AnswerRe: SQL Data type validation Pin
himanshu256117-Jun-09 0:46
himanshu256117-Jun-09 0:46 
AnswerRe: SQL Data type validation Pin
PIEBALDconsult17-Jun-09 9:12
mvePIEBALDconsult17-Jun-09 9:12 
GeneralRe: SQL Data type validation Pin
jonhbt17-Jun-09 23:12
jonhbt17-Jun-09 23:12 
GeneralRe: SQL Data type validation Pin
PIEBALDconsult18-Jun-09 4:42
mvePIEBALDconsult18-Jun-09 4:42 
QuestionC# XmlDocument Encoding Pin
Samb198516-Jun-09 22:24
Samb198516-Jun-09 22:24 
How can i load in a XmlDocument an xml file (from text file) that in the tag contain any type of char ? How can encode this ?

If my file contain char as "&" or "°" there is an exception (Xml.XmlException Errore durante l'analisi di EntityName).

I try with this but don't work:

Encoding enc = Encoding.ASCII;
FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.None);
StreamReader sr = new StreamReader(fs,enc);
string response = sr.ReadToEnd();
XmlDocument xml = new XmlDocument();
xml.LoadXml(response);
fs.Close();
sr.Close();

The exception is Xml.XmlException Errore durante l'analisi di EntityName.
AnswerRe: C# XmlDocument Encoding Pin
SeMartens16-Jun-09 22:45
SeMartens16-Jun-09 22:45 
GeneralRe: C# XmlDocument Encoding Pin
Samb198516-Jun-09 23:18
Samb198516-Jun-09 23:18 
GeneralRe: C# XmlDocument Encoding Pin
SeMartens16-Jun-09 23:45
SeMartens16-Jun-09 23:45 
GeneralRe: C# XmlDocument Encoding Pin
Samb198516-Jun-09 23:47
Samb198516-Jun-09 23:47 
GeneralRe: C# XmlDocument Encoding Pin
SeMartens16-Jun-09 23:53
SeMartens16-Jun-09 23:53 
GeneralRe: C# XmlDocument Encoding [modified] Pin
Samb198517-Jun-09 0:00
Samb198517-Jun-09 0:00 
AnswerRe: C# XmlDocument Encoding Pin
PIEBALDconsult17-Jun-09 9:03
mvePIEBALDconsult17-Jun-09 9:03 
GeneralRe: C# XmlDocument Encoding Pin
Samb198517-Jun-09 9:19
Samb198517-Jun-09 9:19 
GeneralRe: C# XmlDocument Encoding Pin
PIEBALDconsult17-Jun-09 12:00
mvePIEBALDconsult17-Jun-09 12:00 
QuestionAbstract Class, constructors Pin
dwadasi16-Jun-09 21:41
dwadasi16-Jun-09 21:41 
AnswerRe: Abstract Class, constructors [modified] Pin
DaveyM6916-Jun-09 21:58
professionalDaveyM6916-Jun-09 21:58 
AnswerRe: Abstract Class, constructors Pin
PIEBALDconsult17-Jun-09 8:59
mvePIEBALDconsult17-Jun-09 8:59 
Questionproblem with registering flormclosing event with button click event Pin
prasadbuddhika16-Jun-09 21:31
prasadbuddhika16-Jun-09 21:31 
AnswerRe: problem with registering flormclosing event with button click event Pin
musefan16-Jun-09 21:59
musefan16-Jun-09 21:59 
AnswerRe: problem with registering flormclosing event with button click event Pin
DaveyM6916-Jun-09 22:04
professionalDaveyM6916-Jun-09 22:04 
GeneralRe: problem with registering flormclosing event with button click event Pin
prasadbuddhika16-Jun-09 22:29
prasadbuddhika16-Jun-09 22:29 
GeneralRe: problem with registering flormclosing event with button click event Pin
prasadbuddhika16-Jun-09 23:58
prasadbuddhika16-Jun-09 23:58 

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.