Transforming XML from Data Objects



Hello All,

I have a collection of data objects that are based on my application's
data model. I want to be able to serialize this data to different XML
formats (schemas) for use by different consuming applications. For
example, I want to generate XML from the data one way for
Application1, and generate XML in a different format for use by
Application2.

I don't think I can just serialize my objects as XML because I would
lose the flexbility to choose the output schema.

Is there something built into the .NET framework that will allow this
to be done easily? It would be nice if there was some time of template
based system for generating XML from objects. As far as I know, you
can't really apply XSLT transforms from objects.

Any suggestions?

Thanks,
Jeff
.



Relevant Pages

  • Re: Serialization Question
    ... Note that this option can get tricky, as you are going to return an XML string from the web service method, which may not work for them. ... Create another object that has the clients format and transfer the information from your object to that object when the web routine that this client uses is hit. ... The only reason I can see is you are trying to serialize this information and present it, via some sort of service boundary, as XML, not as a serialized object. ... I would take the XML through a transformation to get the format you desire rather than attempt to have the object serialize differently. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Regarding performance on objects serialized to Xml - thoughts and code presented
    ... instance and add the XML to that. ... > StringWriter sW = new StringWriter; ... > XmlTextWriter XmlW = Xml.XmlTextWriter;> ... > // Serialize PlaceHolders ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Serialization Question
    ... files to a partner organisation and they are expecting an XML file of the ... The only reason I can see is you are trying to serialize this information ... If I had Address as Array(of String) then all parts of address would have ... How could I change things so the the XML file produced is of this format: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DataSet and best practice in 2.0
    ... from webservices to remoting no? ... which changes the whole game for distributed apps. ... Collections serialize to XML as well so there's not that much ...
    (microsoft.public.dotnet.framework.performance)
  • Re: DataSet and best practice in 2.0
    ... dataset to a byte, which has about 35,000 elements in the array. ... The suggestion was to use Base64 encoding, not xml, to serialize the ... as far as switching to binary serialization, ...
    (microsoft.public.dotnet.framework.performance)

Loading