XML Serializer modification

XML Serializer modification

am 11.04.2008 21:44:07 von 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



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

am 13.04.2008 18:07:58 von wisccal

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

am 13.04.2008 19:02:56 von Larry Bud

On Apr 13, 12:07=A0pm, wisc...@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
> 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
>
> >
>
> > 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.