I need to extract file (template.xml) from .xsn (InfoPath form template) using C#.
How can I do this? I tried to do it using "DotnetZip" and "Microsoft System.IO.Compression.DeflateSteam" but it doesn't work.
Any help please?
Thanks in advance!
I need to extract file (template.xml) from .xsn (InfoPath form template) using C#.
How can I do this? I tried to do it using "DotnetZip" and "Microsoft System.IO.Compression.DeflateSteam" but it doesn't work.
Any help please?
Thanks in advance!
XSN is not a Zip file, it is CAB.
Here is a blog article talking about manipulation of XSN in JavaScript - http://blogs.msdn.com/b/infopath/archive/2004/05/04/126147.aspx and another one with some samples I've never used http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/58d9cf34-9a43-4d58-96c7-44bff69ca5d4.
I've used "Unpack XSN file using extract.exe utility to the local temporary directory".
(Search for "C# cab extract" http://www.bing.com/search?q=c%23+cab+extract for more code samples)