|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-30 09:20 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
Currently I use function &xml_encode(&$xml) { $xml = str_replace(array('?', '?', '?', '?', '?', '?', '?' ), array('ü', 'Ü', 'ö', 'Ö', 'ä', 'Ä', 'ß' ), $xml ); $xml = preg_replace(array("/\&([a-z\d\#]+)\;/i", "/\&/", "/\#\|\|([a-z\d\#]+)\|\|\#/i", "/([^a-zA-Z\d\s\<\>\&\;\.\:\=\"\-\/\%\?\!\'\(\)\[\]\{\}\$\#\+\,\@_])/e" ), array("#||\\1||#", "&", "&\\1;", "'&#'.ord('\\1').';'" ), $xml ); return $xml; } to 'encode' strings for use with XML. A 'PHP Land' implementation of this would be handy, I think.