The XMLFormat function Rocks, I wish I had know about it before I strung
together all those CF Replace functions. 

Also, I needed the XML reserved taken care of as well as ASCII 127 and up
removed. I think the following code does that for me.


<cfset item_short_desc="&""<>���ú� '">

<cfloop index="ASCIIChars"
        from="127"
        to="254"
        step="1">
                
                <cfset item_short_desc= #Replace("#item_short_desc#",
"#chr(ASCIIChars)#", " ", "ALL")# >
                
                </cfloop>

<cfset item_short_desc = #xmlFormat(#item_short_desc#)#>

Thanks Tim and Michael

Paul
-----Original Message-----
From: Tim Painter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 12:34 PM
To: CF-Talk
Subject: Re: Stripping certain ASCII characters for XML file

Paul,

You might want to look at the XMLFormat function.  It may do what you need.

Tim P.
----- Original Message -----
From: "Paul Sizemore" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 12:52 PM
Subject: Stripping certain ASCII characters for XML file


> How would I make sure that any output I save to a file (CFFile) is
> restricted to characters 32-126 of the 127 US_ASCII approved characters?
I'm
> currently using Repace("xxx","yyy","zzz","all") to replace / escape some
> characters (like "&" to "&amp;") for an XML file.
> Paul Sizemore
>
> Finish Line
> 3308 N Mitthoeffer Rd
> Indianapolis, IN 46235
> W: 317-899-1022 ext 3516
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to