Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralDrag and Drop to Explorer Pin
Anders Molin15-Jun-04 14:17
professionalAnders Molin15-Jun-04 14:17 
GeneralRe: Drag and Drop to Explorer Pin
Heath Stewart16-Jun-04 3:48
protectorHeath Stewart16-Jun-04 3:48 
GeneralRe: Drag and Drop to Explorer Pin
Anders Molin16-Jun-04 3:52
professionalAnders Molin16-Jun-04 3:52 
GeneralDetermining the currently running processes Pin
sam00715-Jun-04 12:54
sam00715-Jun-04 12:54 
GeneralRe: Determining the currently running processes Pin
Dave Kreskowiak16-Jun-04 3:42
mveDave Kreskowiak16-Jun-04 3:42 
GeneralXmlSerializer - Invalid Xml Header Pin
AndyBewley15-Jun-04 12:11
sussAndyBewley15-Jun-04 12:11 
GeneralRe: XmlSerializer - Invalid Xml Header Pin
Heath Stewart16-Jun-04 3:43
protectorHeath Stewart16-Jun-04 3:43 
GeneralRe: XmlSerializer - Invalid Xml Header Pin
bigTrak17-Jun-04 12:20
bigTrak17-Jun-04 12:20 
At the point that the class object is serialized into say a TextWriter, if you examine the string then it is littered with escape chars. Which obviously gets carried through when i set a string to the output of the textwriter. What i was trying to do was create a web method which returns a string, which is the xml document.

I've actually solved the problem now, firstly by using a memory stream (so i can set the encoding) i got rid of the /r/n escape characters within the document body. Secondly by setting the quotechar to a single quote i got rid of the escape chars preceeding each ocurance of a quote (as they became single quotes) in the xml header and namespace declaration.

Am i missing something pretty fundemental here or is the practice of returning an xml document as a string not the done thing!! Serializing directly to a file (as in every example on the web) works fine, but in my particular requirement this is pretty useless.
You say the debugger escapes quotes in the Autos, Locals, this windows. does this apply to outputing the string to the immediate window too, as the escape chars where still there.



GeneralRe: XmlSerializer - Invalid Xml Header Pin
Heath Stewart17-Jun-04 17:09
protectorHeath Stewart17-Jun-04 17:09 
GeneralConstructors Pin
Ganjah78615-Jun-04 11:57
Ganjah78615-Jun-04 11:57 
GeneralRe: Constructors Pin
leppie15-Jun-04 12:07
leppie15-Jun-04 12:07 
GeneralRe: Constructors Pin
Colin Angus Mackay15-Jun-04 12:09
Colin Angus Mackay15-Jun-04 12:09 
GeneralRe: Constructors Pin
Heath Stewart15-Jun-04 12:10
protectorHeath Stewart15-Jun-04 12:10 
GeneralRe: Constructors Pin
Ganjah78615-Jun-04 12:43
Ganjah78615-Jun-04 12:43 
GeneralRe: Constructors Pin
Heath Stewart16-Jun-04 3:06
protectorHeath Stewart16-Jun-04 3:06 
GeneralRe: Constructors Pin
Alvaro Mendez15-Jun-04 12:55
Alvaro Mendez15-Jun-04 12:55 
GeneralRe: Constructors Pin
Heath Stewart16-Jun-04 3:04
protectorHeath Stewart16-Jun-04 3:04 
GeneralRe: Constructors Pin
Uwe Keim15-Jun-04 21:18
sitebuilderUwe Keim15-Jun-04 21:18 
GeneralRe: Constructors Pin
Heath Stewart16-Jun-04 3:05
protectorHeath Stewart16-Jun-04 3:05 
GeneralPossible Attribute bug Pin
leppie15-Jun-04 11:18
leppie15-Jun-04 11:18 
GeneralRe: Possible Attribute bug Pin
Heath Stewart15-Jun-04 11:27
protectorHeath Stewart15-Jun-04 11:27 
GeneralRe: Possible Attribute bug Pin
leppie15-Jun-04 12:03
leppie15-Jun-04 12:03 
GeneralRe: Possible Attribute bug Pin
Heath Stewart15-Jun-04 12:06
protectorHeath Stewart15-Jun-04 12:06 
GeneralLooping Through Windows Forms Instances Pin
XanderSon15-Jun-04 11:06
XanderSon15-Jun-04 11:06 
GeneralRe: Looping Through Windows Forms Instances Pin
Heath Stewart15-Jun-04 11:23
protectorHeath Stewart15-Jun-04 11:23 

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.