| re: XML Entity Functions
htmlspecialchars() doesn't do &apros; though. It's easy enough to use
strtr(), but if the string is of multi-byte encoding, then it might not work
(the second byte of a 2-byte character would be <>&"', but shouldn't be
replaced).
Uzytkownik "Eric Bohlman" <ebohlman@earthlink.net> napisal w wiadomosci
news:Xns9477D2C4745Bebohlmanomsdevcom@130.133.1.4. ..[color=blue]
> "Chung Leong" <chernyshevsky@hotmail.com> wrote in
> news:YtudncTw97RIlJPdRVn-jw@comcast.com:
>[color=green]
> > How come there isn't a xmlspecialchars(), and for that matter,
> > xml_entity_decode()? I would think someone would have thought of that by
> > now.[/color]
>
> Probably because the only reserved characters (and the only ones with
> predefined entities) in XML are the ones handled by htmlspecialchars().
> Remember that unless a DTD defines further entities, the only character
> entity names available in XML are &, <, >, ", and '.[/color] |