XML Serializer modification

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?
 
L

Larry Bud

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top