[TYPO3-dev] PHP5 xmlReader and entities
Dmitry Dulepov
dmitry at typo3.org
Thu Jul 5 12:12:35 CEST 2007
Elmar Hinz wrote:
> As soon as I have an entity like I get errors and the parser breaks.
> Unfortunatly there are still few comments on php.org and my searches on
> google return unspecific results.
>
> parser error : Entity 'nbsp' not defined
>
> Could it be that I need to do an entire setup of DTD catalogues to use this
> PHP extension? I would expect that standards like xhtml DTD are build in.
Not really. You can get all html entities using
get_html_translation_table(HTML_ENTITIES) function and convert entities
in the file to numeric entities. It will pass xml parsing after that.
Used this technique in one of my private extensions for customers, works
great. You may beed to watch for entities that show some national
characters though. That PHP function does not return them.
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-dev
mailing list