note 107188 added to simplexml.examples-basic
| From: | mishagale at fastmail dot fm | Date: | Fri, 13 Jan 2012 09:12:46 +0000 |
| Subject: | note 107188 added to simplexml.examples-basic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185628@lists.php.net to get a copy of this message | ||
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 Ó 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 "&#60;">
<!ENTITY gt ">">
<!ENTITY amp "&#38;">
<!ENTITY apos "'">
<!ENTITY quot """>
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
----
Server IP: 69.147.83.197
Probable Submitter: 83.223.97.201
----
Manual Page -- http://www.php.net/manual/en/simplexml.examples-basic.php
Edit -- https://master.php.net/note/edit/107188
Del: integrated -- https://master.php.net/note/delete/107188/integrated
Del: useless -- https://master.php.net/note/delete/107188/useless
Del: bad code -- https://master.php.net/note/delete/107188/bad+code
Del: spam -- https://master.php.net/note/delete/107188/spam
Del: non-english -- https://master.php.net/note/delete/107188/non-english
Del: in docs -- https://master.php.net/note/delete/107188/in+docs
Del: other reasons-- https://master.php.net/note/delete/107188
Reject -- https://master.php.net/note/reject/107188
Search -- https://master.php.net/manage/user-notes.php