Connecting Tech Pros Worldwide Forums | Help | Site Map

Transforming XML from Data Objects

Jeff.Thorn@gmail.com
Guest
 
Posts: n/a
#1: Sep 11 '08
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
Martin Honnen
Guest
 
Posts: n/a
#2: Sep 12 '08

re: Transforming XML from Data Objects


Jeff.Thorn@gmail.com wrote:
Quote:
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.
You could serialize the objects to XML, then process that XML as needed
with XSLT stylesheets to create the different outputs you want.

There also is some (.NET 1.0) tool named ObjectXPathNavigator
http://msdn.microsoft.com/en-us/library/ms950764.aspx
that could be directly fed to an XSLT transformation, I don't know
however how easy it is to port that to .NET 2.0.


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Closed Thread