Hey All,

OK...with or without supressing whitespace I get XML with carriage returns and 
spaces etc.  when I use this code:

  <cfoutput>  
    <cfxml variable="XMLResult">
     <root>
        <columns>#Trim(XMLFormat(arrayLen(cols)))#</columns>
        <rows>#Trim(XMLFormat(ARGUMENTS.queryObj.recordCount))#</rows>
        <cfloop from="1" to="#ARGUMENTS.queryObj.recordCount#" index="currRec">
          <#ARGUMENTS.rowNodeName#>
          <!--- loop over the columns and add the value for each one to the row 
--->
            <cfloop from="1" to="#arrayLen(cols)#" index="currCol">
           <cfset currColName = lcase(cols[currCol])>
           <cfset currColValue = ARGUMENTS.queryObj[cols[currCol]][currRec]>
              <#currColName#>
             #Trim(XMLFormat(currColValue))#
              </#currColName#>  
            </cfloop>
          </#ARGUMENTS.rowNodeName#>
        </cfloop>    
     </root>
    </cfxml>
  </cfoutput>

but this code does not have all that crap in it because it's on one line:

<cfoutput><cfxml 
variable="XMLResult"><root><columns>#Trim(XMLFormat(arrayLen(cols)))#</columns><rows>#Trim(XMLFormat(ARGUMENTS.queryObj.recordCount))#</rows><cfloop
 from="1" to="#ARGUMENTS.queryObj.recordCount#" 
index="currRec"><#ARGUMENTS.rowNodeName#><cfloop from="1" to="#arrayLen(cols)#" 
index="currCol"><cfset currColName = lcase(cols[currCol])><cfset currColValue = 
ARGUMENTS.queryObj[cols[currCol]][currRec]><#currColName#>#Trim(XMLFormat(currColValue))#</#currColName#></cfloop></#ARGUMENTS.rowNodeName#></cfloop></root></cfxml></cfoutput>
 

Any ideas on preservibng my code formatting whilst not getting the extra 
characters?

TIA

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235094
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to