House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

Save Form Data to XML file

Author:
Tom Jones
12/14/2011 11:42 PM

Hello, I have been searching all over cf-talk archives and on google and I don't see a good example on how to save form data to a xml file. So what I'm doing right now is, I have a xml file and read that and then display it in a form so the it can be edited. Here is an example on what I'm thinking. What I'm struggling with is the form data is not returned as an array of structs where I could easily create a xml file from, it's just coma separated lists. Thanks, tom <!--- Example XML <columns>     <column>         <align>left</align>         <dname>Agent Version</dname>         <hidden>false</hidden>         <idx>2</idx>         <name>agent_version</name>         <order>2</order>         <width>100</width>     </column>     <column>         <align>left</align>         <dname>Allow Client</dname>         <hidden>false</hidden>         <idx>3</idx>         <name>AllowClient</name>         <order>1</order>         <width>100</width>     </column> </columns> ---> <form name="colSettings" method="post"> <table width="600" cellpadding="2" cellspacing="1"> <tr>   <th>Order</th>   <th>Display Name</th>   <th>Align Text</th>   <th>Hide</th>   <th>Column Width</th> </tr> <cfloop index="x" array="#sortedColsArray#"> <tr> <cfoutput>   <td><input type="text" name="order" size="3" value="#x.order#"></td>   <td><input type="text" name="dname" size="50" value="#x.dname#"></td>   <td><input type="text" name="align" size="10" value="#x.align#"></td>   <td><input type="text" name="hidden" size="3" value="#x.hidden#"></td>   <td><input type="text" name="width" size="10" value="#x.width#"></td> </cfoutput>   </tr> </cfloop> </table> <input name="submit" type="submit" value="Save" /> </form>


Search cf-talk

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference