XML Serializer modification

  • Thread starter Thread starter Larry Bud
  • Start date Start date
L

Larry Bud

I have a client that's calling a web service that I wrote. The
webservice returns a string. The string is actually XML that I'm
creating by serializing an object.

However, they want a response WITHOUT the

<?xml version="1.0"?>

tag at the top. Yes, I know, it's technically not XML at that
point.

Any way to eliminate that when doing the serialization, or do I just
need to strip it out manually?
 
Hi

The XmlWriterSettings class has an OmitXmlDeclaration property. For an
example, check outhttp://msdn2.microsoft.com/en-us/library/system.xml.xmlwritersettings...

=============
Regards,
Stevewww.stkomp.com

Thanks, but I'm not using the XML Writer, I'm using Serialization.
 
Back
Top