XML_Util::replaceEntities() – replace XML entities


require_once 'XML/Util.php';

string XML_Util::replaceEntities ( string $string )


In XML documents you are not allowed to use & and <. The have to be replaced with their respective entities. This method does this for you and furthermore replaces all other predefined XML entities.


  • string $string - string, in which entities have to be replaced

Return value

string string with entities replaced


This function should be called statically.

XML_Util::isValidName (Previous) XML_Util::reverseEntities (Next)
Last updated: Tue, 02 Jun 2009 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.