Im writing an coldfusion application that uses soXML (on coldfusion server 4.5). The application is a simple form that dumps the data from text area and a input (type = text) form elements into a coldfusion variable (cfset) and outputs it to a file using cfset the problem im having is that when i hit return when typing say 2 paragraphs the spacing between the 2 paragraphs doubles (2 returns = 4 returns, 4 returns = 8 returns etc) all im doing is going from a textarea to xml and then pulling the xml back into the textarea. the code is below? how do i get it from adding extra returns? got any ideas?
DJ
submitxml.cfm
------------------------------------------------
<!--- Set the XML document as a variable --->
<cfset xmlUserWeakness='<?xml version="1.0" encoding="iso-8859-1"?>
<User_Weakness>
<Document>
<UserData>
<User_Id>123</User_Id>
<User_Role>Command User</User_Role>
<Command>NavSea</Command>
<FirstName>Dan</FirstName>
<LastName>Joplin</LastName>
<EmailAddress>[EMAIL PROTECTED]</EmailAddress>
<PhoneNumber>198-234-2345</PhoneNumber>
</UserData>
<Dates>
<DateCreated>2/3/20</DateCreated>
<DateLastModified>2/3/45</DateLastModified>
</Dates>
<Weakness User_Id="123" User_Role="CommandUser">
<Weakness_Title>#Form.Weakness_Title#</Weakness_Title> <Weakness_Paragraph>#Form.Weakness_Paragraph#</Weakness_Paragraph>
</Weakness>
</Document>
</User_Weakness>'>
<!--- Write the XML to a file --->
<cffile action="WRITE"
file="D:\Inetpub\wwwroot\SOA\UserDocuments\Test.xml"
output="#xmlUserWeakness#">
<cflocation url="SubmitWeakness.cfm">
SubmitWeakness.cfm
---------------------------------------
<cfif FileExists("D:\Inetpub\wwwroot\soa\UserDocuments\test.xml")>
<cf_SOXML
action="XML2CF"
input="D:\Inetpub\wwwroot\soa\UserDocuments\test.xml"
output="UserWeakness"
type="file">
<cfscript>
//Lets grab the nodes of the information we want to display
Weakness_Title = UserWeakness.User_Weakness.Document.Weakness.Weakness_Title.Value;
Weakness_Paragraph = UserWeakness.User_Weakness.Document.Weakness.Weakness_Paragraph.Value;
</cfscript>
<cfoutput>
<table>
<cfform action="submitXML.cfm" method="post" enctype="text/xml">
<tr>
<td></td>
<td><strong>Insert New Weakness</strong><br></td>
</tr>
<tr>
<td align="right" valign="top">Title:</td>
<td><input type="text" name="Weakness_Title" value="#Weakness_Title#" size="80" maxlength="80"></td>
</tr>
<tr>
<td align="right" valign="top">Explain Weakness:</td>
<td><textarea name="Weakness_Paragraph" rows="20" cols="80" wrap="off">#Weakness_Paragraph#</textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Submit Weakness"></td>
</tr>
</cfform>
</table>
</cfoutput>
Send and receive Hotmail on your mobile device: Click Here
-----------------------+ cf-xml mailing list list: [EMAIL PROTECTED] admin: [EMAIL PROTECTED] home: http://torchbox.com/xml
