Create xml file from InfoPath (xsn) file
-
I have an InfoPath file and want to create an xml file of it using C#. The xml file should look exactly like the one that would be saved if I opened the form with InfoPath and saved it as xml. Can that be done somehow with C#? I've tried to rename the xsn file to cab, extract template.xml and sampledata.xml, but they are nothing like the xml file that is created from InfoPath.
-
I have an InfoPath file and want to create an xml file of it using C#. The xml file should look exactly like the one that would be saved if I opened the form with InfoPath and saved it as xml. Can that be done somehow with C#? I've tried to rename the xsn file to cab, extract template.xml and sampledata.xml, but they are nothing like the xml file that is created from InfoPath.
Start here: http://msdn2.microsoft.com/en-us/library/bb448854.aspx Then the following will be useful too. http://www.microsoft.com/downloads/info.aspx?na=47&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=ad0b72fb-4a1d-4c52-bdb5-7dd7e816d046&u=details.aspx%3Ffamilyid%3D8D46C01F-E3F6-4069-869D-90B8B096B556%26displaylang%3Den http://www.microsoft.com/downloads/details.aspx?familyid=ad0b72fb-4a1d-4c52-bdb5-7dd7e816d046&displaylang=en
-
Start here: http://msdn2.microsoft.com/en-us/library/bb448854.aspx Then the following will be useful too. http://www.microsoft.com/downloads/info.aspx?na=47&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=ad0b72fb-4a1d-4c52-bdb5-7dd7e816d046&u=details.aspx%3Ffamilyid%3D8D46C01F-E3F6-4069-869D-90B8B096B556%26displaylang%3Den http://www.microsoft.com/downloads/details.aspx?familyid=ad0b72fb-4a1d-4c52-bdb5-7dd7e816d046&displaylang=en
-
Thanks, it looks interesting. Are you sure that it works for InfoPath files? It's a part of MS Office, but it is not listed. Have you or anyone else done this before? Would be nice to see some examples on how to make the xml file.
Not done it for infopath files but for excel .xlsx format... there is an article on code project about openXML file formats that was helpful with the excel stuff http://www.codeproject.com/office/OpenXML.asp[^]
-
Not done it for infopath files but for excel .xlsx format... there is an article on code project about openXML file formats that was helpful with the excel stuff http://www.codeproject.com/office/OpenXML.asp[^]
I'll take a look at it. But I'm not to hopefull that it works with InfoPath forms because according to Microsoft it only works with: * This download works with the following Office applications: o Microsoft Office Excel 2007 o Microsoft Office PowerPoint 2007 o Microsoft Office Word 2007