Create a .net class from Infopath XSD data

P

Pascal Brunot

Hi,

Is there a way using VS.net 2003 to create a class from an XSD in a few
clicks ? I'd like to create business objects from form templates
quickly since I have lots of form templates to manage.

These classes will be used to computats stats and complex
interdependent formulas that cannot be done at form level.

I'd like to avoid using a DOMDocument in my business layer to handle
the forms, since it is not strongly typed and requires me to use XPath
to access every form data...

More generally, what is the best practice to move the infopath data to
the business layer of my app?

Thanks,
Pascal.
 
P

Paul Robinson

On the narrow subject of class creation, open the project in VS.NET which
needs to consume the new dataset, open the Infopath XSD in the VS.NET
designer and choose 'Generate Dataset' from the Schema menu. This creates a
strongly typed datset.
 
P

Pascal Brunot

Thanks Paul.

I found that a tool called XSDObjectGenerator on MSDN is able to
generate a class from a XSD. I have to look further to know how well
infopath's schemas as translated.

It sounds to me that a class is best suited to handle complex business
logic than a dataset, but I'll check your solution too.
 

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