I have a document library in Sharepoint 2010 and stored the infopath 2010 forms template (XSN file). Is there a way to programmatically (using C# code) open the XSN using SharePoint Object Model or Infopath 2010 object Model. I want to open the .XSL file and change some text and then repackage the file. I know there are some assemblies like Microsoft.Deployment.Compression
and Microsoft.Deployment.Compression.Cab
which will extract the XSN (cab file) and unpack them to a temp folder. But this will require some elevated permission etc., etc.,
Is there a better way of doing it using infopath 2010 or sharepoint 2010 object model.