Seona Bellamy wrote: > > I'm pulling in an XML file via an RSS feed. It has some &'s which are > not encoded as & and some which are (as well as a smattering of > "'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 & but leave every other & (ie, the ones already used as > part of an entity) alone?
There is a UDF that does that which of course I can't find at the moment :-) It is a fancy regex that searches out all "&" and looks for a ";" at 3 or 4 chars after that, if it can't find one then it replaces the "&" with "&". I also recollect a bit that does the same search for the "&" and then looks for a "<" before a ";" and if it finds one then it does the replace on the "&". I think that covered all bases. HTH Kym K --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
