XML => Class

J

Just D.

All,

Is there any way to create a class from the XML file or at least to simplify
the process of the creation of the class knowing the XML file format, its
structure, etc.?

The idea is to use an XML file to transfer data between two (or more)
companies. I would not like to expose as our classes as the whole business
logic, but I need to create something like a intermediate class to
read/write the XML file with the appropriate data.This class I suppose can
be sent to our clients to use it in their apps to create the object and
write the XML file with the object data.

The way to create the class first and then serialize it into XML file is not
looking good because the class is complicated enough and has a few arrays
inside, these arrays can also have arrays and maybe I'm wrong but the whole
structure of this class is not looking good to go this way.

Ideas?

Just D.
 
P

Piotr Dobrowolski

Dnia 27-03-2006 o 21:55:25 Just D. said:
All,

Is there any way to create a class from the XML file or at least to
simplify
the process of the creation of the class knowing the XML file format, its
structure, etc.?

The idea is to use an XML file to transfer data between two (or more)
companies. I would not like to expose as our classes as the whole
business
logic, but I need to create something like a intermediate class to
read/write the XML file with the appropriate data.This class I suppose
can
be sent to our clients to use it in their apps to create the object and
write the XML file with the object data.

The way to create the class first and then serialize it into XML file is
not
looking good because the class is complicated enough and has a few arrays
inside, these arrays can also have arrays and maybe I'm wrong but the
whole
structure of this class is not looking good to go this way.

Ideas?

[PD] Use xsd.exe, this tool is provided exactly to solve such problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top