Click here to Skip to main content
15,914,924 members
Home / Discussions / C#
   

C#

 
GeneralRe: A general question about objects Pin
Grimolfr20-May-04 5:52
Grimolfr20-May-04 5:52 
GeneralRe: A general question about objects Pin
Heath Stewart20-May-04 5:57
protectorHeath Stewart20-May-04 5:57 
GeneralOne more simple question if someone have time. Pin
Christer Claesson20-May-04 5:18
Christer Claesson20-May-04 5:18 
Generaldll that is seen by multiple exe's Pin
jspano20-May-04 2:21
jspano20-May-04 2:21 
GeneralRe: dll that is seen by multiple exe's Pin
Heath Stewart20-May-04 3:01
protectorHeath Stewart20-May-04 3:01 
GeneralRe: dll that is seen by multiple exe's Pin
jspano20-May-04 14:31
jspano20-May-04 14:31 
GeneralXmlSerializer Pin
Sean Rock20-May-04 1:45
Sean Rock20-May-04 1:45 
GeneralRe: XmlSerializer Pin
Heath Stewart20-May-04 2:54
protectorHeath Stewart20-May-04 2:54 
The first line is there for a good reason: it tells the other end what version of XML your file is in and what the encoding is. You really shouldn't delete it. It won't affect any XML classes (like an XmlTextReader) on the other end.

Simply using the XmlSerializer, there is no way to remove the processing instruction. If you want to do it anyway (and again I strongly recommend against it - it's not like it's hurting anythig anyway), you'd have to serialize your object graph to a stream (perhaps a MemoryStream), read it back in using a combination of an XmlTextReader and an XmlTextWriter - or use an XmlDocument which can be slow depending on the size of the XML document/fragment - and remove the processing instruction before sending.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: XmlSerializer Pin
Sean Rock20-May-04 3:02
Sean Rock20-May-04 3:02 
GeneralRe: XmlSerializer Pin
Heath Stewart20-May-04 3:26
protectorHeath Stewart20-May-04 3:26 
GeneralRe: XmlSerializer Pin
Sean Rock20-May-04 3:37
Sean Rock20-May-04 3:37 
GeneralRe: XmlSerializer Pin
Dave Kreskowiak20-May-04 3:48
mveDave Kreskowiak20-May-04 3:48 
GeneralRe: XmlSerializer Pin
Sean Rock20-May-04 3:51
Sean Rock20-May-04 3:51 
Generalconvert a field to checkbox sql reporting services Pin
robmays20-May-04 1:11
robmays20-May-04 1:11 
GeneralDBase file access in C# Pin
IJay20-May-04 1:04
IJay20-May-04 1:04 
GeneralRe: DBase file access in C# Pin
Anthony_Yio20-May-04 1:11
Anthony_Yio20-May-04 1:11 
GeneralRe: DBase file access in C# Pin
sreejith ss nair20-May-04 2:18
sreejith ss nair20-May-04 2:18 
GeneralRe: DBase file access in C# Pin
IJay20-May-04 2:20
IJay20-May-04 2:20 
GeneralRe: DBase file access in C# Pin
Heath Stewart20-May-04 2:50
protectorHeath Stewart20-May-04 2:50 
GeneralRe: DBase file access in C# Pin
Anthony_Yio20-May-04 15:43
Anthony_Yio20-May-04 15:43 
GeneralRe: DBase file access in C# Pin
IJay20-May-04 22:11
IJay20-May-04 22:11 
GeneralOpening any file Pin
Dylan van Heerden19-May-04 23:38
Dylan van Heerden19-May-04 23:38 
GeneralRe: Opening any file Pin
the last free name20-May-04 0:55
the last free name20-May-04 0:55 
GeneralRe: Opening any file Pin
Dylan van Heerden20-May-04 1:07
Dylan van Heerden20-May-04 1:07 
GeneralRe: Opening any file Pin
the last free name20-May-04 1:58
the last free name20-May-04 1: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.