I forgot to mention

you're going to have to park all the other HTML entities as well under
other sentinal values (eg "'s ) before getting rid of the nasty
single "&"

but I'm sure you get the idea.

On 5/9/08, Barry Beattie <[EMAIL PROTECTED]> wrote:
> is the "&" sourounded by spaces?
>
> so you could do replace(myXML, " & ", "&amp;")?**
>
> or if not
>
> <cfscript>
> // park all legit ones with a sentinal value
> replace(myXML, "&amp;", "X_SENTINALVALUE_X")
> // replace all breaking & with the real thing
> replace(myXML, "&", "&amp;" )
> // return the real things from the sentinal value
> replace(myXML, "X_SENTINALVALUE_X", "&amp;" )
> xmlParse(myXML)
> </cfscript>
>
>
> ** is that the correct argument order? can't remember... Livedocs
>
>
> On 5/9/08, Seona Bellamy <[EMAIL PROTECTED]> wrote:
> >
> > Hi guys,
> >
> > Hopefully a quick and easy one for someone - I'm sure this is going to
> > be one of those things with an easy fix I'm just not seeing!
> >
> > I'm pulling in an XML file via an RSS feed. It has some &'s which are
> > not encoded as &amp; and some which are (as well as a smattering of
> > &quot;'s and other entities). Apparently, those unencoded &'s are what
> > is preventing me running this data through xmlParse().
> >
> > Is there a way in which I can isolate those unencoded &'s and change
> > them to &amp; but leave every other & (ie, the ones already used as
> > part of an entity) alone?
> >
> > I tired running htmlEditFormat() over it, but that translated
> > everything including the structural stuff and so I couldn't parse it
> > anyway. :(
> >
> > Cheers,
> >
> > Seona.
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to