Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XmlSerializer
Message
From
27/05/2005 07:32:00
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
XmlSerializer
Miscellaneous
Thread ID:
01018060
Message ID:
01018060
Views:
60
Hi all

I'm banging my head over one thing. I have this object class I'm sendig over http post. To do that, I use XmlSerializer.Serialize and pass on a Stream from GetRequestStream. XmlSerializer then serializes the object and uses the Stream object to write and send the XML to the remote service.

However, I now have the case where I need to serialize the object, then take the xml and apply some XSLT in order to make the XML compliant to the format expected from the remote service. But the Serialize() method only takes writers as parameter, whereas I really could use a XmlReader to get the XML and transform it before shipping it on.

As far as I could gather, the only workaround would be to serialize the object to file using XmlWriter, and then read from file using XmlReader, transforming it and then send over http to the remote service. It sounds way over the top having to write to disk every time I need to intercept the serializing in order to perform the XSLT transformation.

Any ideas?

Thanks
Danijel
Next
Reply
Map
View

Click here to load this message in the networking platform