> I was impressed with the
XmlFormat functionality.... until I realized
> that it didn't convert
everything into "an XML-readable format" as the
> literature seems to indicate. It does well when handling
non-String data type
> conversions but not-so-well with strings containing
characters antithematic to
> XML, including characters such as "<", ">", "@",
quotes and apostrophes.
Err... what makes you say that?
xmlFormat() performs the following transitions:
< => <
> => >
' => '
@ => [no change, none necessary]
& => &
" => "
That certainly covers all the things your function does, with
the added
bonus that it does it correctly (which yours doesn't, see
below).
What are you seeing that it's doing wrong?
>
REReplace(inString, "<", "<", "All");
>
REReplace(inString, ">", ">", "All");
This could be how the newsfeed parses data, but from where
I'm sitting,
you're swapping the angle brackets for... the same angle
brackets.
>
REReplace(inString, "@", "&", "All");
An @ is not an &
>
REReplace(inString, '"', ''', 'All');
Hang on. You're swapping out an apostrophe for an '
- fair enough -
but then swapping out a double-quote for an apostrophe. That
doesn't seem
right.
I expect xmlFormatFormat() probably has that one nailed
correctly with the
"
--
Adam