[thelist] White space + cold fusion

Jeff Howden jeff at jeffhowden.com
Thu Mar 27 23:07:33 CST 2003


hi,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Stevenson Ngila
>
> How can i remove white spaces in cold fusion i.e.
> I have an xml document generated by cold fusion,
> but the generated xml doc looks like:
>
> <names>
>
>
>
>
> 	<firstname>john</firstname>
> </names>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

that'll depend alot on what version you're using.

<cfsilent>
<cfprocessingdirective suppresswhitespace="Yes">
<cfsetting enablecfoutputonly="Yes">

judicious use of cf comments

probably the best way is to avoid things that'll cause unnecessary
whitespace.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> <cfoutput>
> <names>
>   <cfstoredproc procedure="sp_Getnames"
>                   datasource="#Application.theDb#">
>     <cfprocparam dbvarname=@iCallNumber type="out"
>                  variable="CallNumber"
>                  cfsqltype="CF_SQL_VARCHAR">
>   </cfstoredproc>
>   <firstname>#CallNumber#</firstname>
> </names>
> </cfoutput>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

there's your problem right there.  move the call to the stored proc outside
the output of your xml.

.jeff

http://evolt.org/

NOTICE:  members.evolt.org web and email address are changing!
---------------------------------------------------------------------
| OLD:                            | NEW:                            |
| jeff at members.evolt.org          | evolt at jeffhowden.com            |
| http://members.evolt.org/jeff/  | http://evolt.jeffhowden.com/    |
---------------------------------------------------------------------





More information about the thelist mailing list