Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

hi we all know how the infopath is working. when we give details in infopath form the datas are stored as XML File. And when we open it the datas from XML are merged with infopath form design.

I need to show the datas which is present in XML with my own designed form in the runtime. So my question is how can i read the fields which is in Infopath Form. Then only i can design my own form in the runtime.

share|improve this question

closed as off topic by Alex Angas May 9 '11 at 3:45

Questions on SharePoint Stack Exchange are expected to relate to SharePoint within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

InfoPath Templates are a combination of Xslt views, XSD schemas, XML default values, resources, and manifest files stored in a .CAB file with the extension .XSN. If you want to see the internals rename an InfoPath template from .XSN to .CAB, or open the form in design mode in InfoPath and then "Save as Source" to a folder.

To generate a custom form at runtime, you would need to uncompress the XSN with a CAB library, and then extract and parse the XSD for the main datasource to determine the data type for each element/attribute.

It is possible to do what you are considering, but it will not be easy. I don't have a code sample to get you started.

share|improve this answer
thank you Chris, atleast i got to know it is possible. let me know something on this when you get some informations – Michael May 3 '11 at 11:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.