Connecting Tech Pros Worldwide Help | Site Map

Transforming XML from Data Objects

  #1  
Old September 11th, 2008, 07:55 PM
Jeff.Thorn@gmail.com
Guest
 
Posts: n/a
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
  #2  
Old September 12th, 2008, 12:35 PM
Martin Honnen
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transforming XML from Data Objects Options Jeff.Thorn@gmail.com answers 1 September 13th, 2008 02:35 PM
Newbie question: applications for generating XML database Josip answers 0 July 1st, 2008 03:05 PM
xslt queries in xml to SQL queries Ian Roddis answers 3 February 26th, 2006 07:05 PM
Using PHP to generate HTML from the contents of an XML file? Paul Nagle answers 5 July 17th, 2005 04:22 AM