XML Serializer modification
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?
Re: XML Serializer modification
Hi
The XmlWriterSettings class has an OmitXmlDeclaration property. For an
example, check out http://msdn2.microsoft.com/en-us/library/system.xml.xmlwrite rsettings.omitxmldeclaration.aspx
=============
Regards,
Steve
www.stkomp.com
Larry Bud wrote:
> 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?
Re: XML Serializer modification
On Apr 13, 12:07=A0pm, wisc... [at] googlemail.com wrote:
> Hi
>
> The XmlWriterSettings class has an OmitXmlDeclaration property. For an
> example, check outhttp://msdn2.microsoft.com/en-us/library/system.xml.xmlw=
ritersettings...
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Regards,
> Stevewww.stkomp.com
>
>
>
> Larry Bud wrote:
> > I have a client that's calling a web service that I wrote. =A0The
> > webservice returns a string. =A0The string is actually XML that I'm
> > creating by serializing an object.
>
> > However, they want a response WITHOUT the
>
> > <?xml version=3D"1.0"?>
>
> > tag at the top. =A0Yes, 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?- Hide quoted text -
Thanks, but I'm not using the XML Writer, I'm using Serialization.