note 107188 deleted from simplexml.examples-basic by danbrown

From: Date: Fri, 25 May 2012 23:53:34 +0000
Subject: note 107188 deleted from simplexml.examples-basic by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-188244@lists.php.net to get a copy of this message
Note Submitter: mishagale at fastmail dot fm ---- When running example #4 on the command line, I got this output: $ php-cgi phpsimplexmltest.php X-Powered-By: PHP/5.3.6-13ubuntu3.3 Content-type: text/html Ms. Coder played by Onlivia Actora Mr. Coder played by El ActÓr Note that the &#211; HTML entity has been automatically translated into its unicode equivalent. This is a violation of the XML spec, as the only entities that it recognises (unless you manually define more in your DTD or schema) are <!ENTITY lt "&#38;#60;"> <!ENTITY gt "&#62;"> <!ENTITY amp "&#38;#38;"> <!ENTITY apos "&#39;"> <!ENTITY quot "&#34;"> http://www.w3.org/TR/REC-xml/#sec-predefined-ent This means, that if you want to send unicode text to a website which doesn't support it, the standard trick of encoding it using HTML entities won't work, if that website is using SimpleXML

« previous php.notes (#188244) next »