Xml special characters and xlate

Fairlight fairlite at fairlite.com
Tue Oct 2 13:03:41 PDT 2007


On Tue, Oct 02, 2007 at 12:37:03PM -0700, after drawing runes in goat's blood,
fp at casabellagallery.com cast forth these immortal, mystical words:
> Walter posted:
> > 
> > B=TOHTML(A);
> 
> This is a very nice function, I did not know it existed.
> Those of us that have used instr() and mid() to break 
> string and put back together must be hating this function.

This assumes that:

1) HTML and XML follow the same rules.  They don't.  HTML is far looser,
and while many entities may be held in common, they aren't guaranteed to be
identical lists.  How well is TOHTML documented in what it alters?

2) The entity list has not been and will not be modified, and that TOHTML
is actually dependable for an infinite amount of time.

3) There's no CDATA block involved where you only want partial conversion
around it but not in it.

...Amongst others I'm probably overlooking.

It may work for some things, but I wouldn't toss away mid() and instr()
just yet.

This is the sort of thing regex and substitution are perfect for.  See my
other thread that I started, only to come back to see you post this.  :)

mark->
-- 
Most people think the defining traits of human beings are intelligence,
speech, writing, or creativity.  The sad reality is that the most singular
defining quality of humanity is cruelty.  No other species appears to be so
able and willing to inflict pain on its brethren for no logical reason.


More information about the Filepro-list mailing list