Misbah
asked on
Download SharePoint InfoPath xml Form as HTML file
Hi Experts,
I am looking for a way to download InfoPath xml forms from SharePoint as HTML,
I know the forms can be viewed in the browser :
http://msdn.microsoft.com/en-us/library/ms772417.aspx
and I am looking for a way to download them as HTML files using a WebClient in C# ?
Thanks
I am looking for a way to download InfoPath xml forms from SharePoint as HTML,
I know the forms can be viewed in the browser :
http://msdn.microsoft.com/en-us/library/ms772417.aspx
and I am looking for a way to download them as HTML files using a WebClient in C# ?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is some better documentation on the process I was recommending above. No need to extract xsl using 7zip and he also provide a C# method to do it.
http://code.cmsstores.com/infopath-form-to-html-using-c/
http://code.cmsstores.com/infopath-form-to-html-using-c/
Not sure why the XSLT HTML would look any different. Its the exact same method InfoPath uses.
ASKER
simple forms are fine , bot complex ones will miss few things ..
for example , I have a form with attachment , when it is viewed in the browser, I can see the name of the attachment in a box, but when I transfer the XML to HTML, I don't see it anymore.
for example , I have a form with attachment , when it is viewed in the browser, I can see the name of the attachment in a box, but when I transfer the XML to HTML, I don't see it anymore.
Yes, that is understandable. You can make modification to the html though (search replace, etc).
For instance, we change links to images from relative path to absolute path so they are correctly referenced.
I don't think you will find a better solution.
For instance, we change links to images from relative path to absolute path so they are correctly referenced.
I don't think you will find a better solution.
ASKER
I tried this solution already, the generated HTML does not look exactly as the form when it is displayed in the browser, so now I am trying to find a way to just download the from from the browser in HTML. when I tried the XML transformation method, I was not aware that I can actually view the InfoPath XML file as a web page directing in the browser.