<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Download a xml file by a submit button.</title><link>https://community.appian.com/discussions/f/user-interface/17560/download-a-xml-file-by-a-submit-button</link><description>Someone knows how to download an xml file by pressing a Submit button , the xml is saved as a string in a database. First I need to do a database query and extract the xml from the field , I save it in a local and then I transform the xml into a document</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Download a xml file by a submit button.</title><link>https://community.appian.com/thread/69181?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2019 12:37:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9fd1ba7d-8fd4-4dd4-9c70-dcf4ba6eee32</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;You should be able to create an XML file by using a plugin like this one:&amp;nbsp;&lt;a href="/b/appmarket/posts/dynamic-document-generator"&gt;https://community.appian.com/b/appmarket/posts/dynamic-document-generator&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To actually set up the download, I&amp;#39;d recommend creating a process&amp;nbsp;with two nodes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The first step should&amp;nbsp;create the document using the Smart Service from the plugin above. Inside the smart service, upload a basic template for a text file. Then, insert your XML data by defining a query using the a!queryEntity() function.&amp;nbsp;Once you create the new file, save the result into a process variable that can be used in the next step in your process.&lt;/li&gt;
&lt;li&gt;Next, include a User Input Task where you pass the document you created in the previous step as an input to this form. On the form, I&amp;#39;d suggest including a document download link to allow the user to download your document:&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Document_Link_Component.html"&gt;https://docs.appian.com/suite/help/latest/Document_Link_Component.html&lt;/a&gt;&amp;nbsp;Keep in mind that it isn&amp;#39;t possible to have a button that both downloads and submits the form at the same time, so it will be better to use the link first and then use a separate submit button.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>