#50880 [Csd]: SimpleXML parser error in example
| From: | kotnick at gmail dot com | Date: | Fri, 29 Jan 2010 13:51:21 +0000 |
| Subject: | #50880 [Csd]: SimpleXML parser error in example | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3806@lists.php.net to get a copy of this message | ||
ID: 50880
User updated by: kotnick at gmail dot com
Reported By: kotnick at gmail dot com
Status: Closed
Bug Type: Documentation problem
Operating System: Ubuntu 9.10
PHP Version: Irrelevant
New Comment:
Thank you for fixing it!
Previous Comments:
------------------------------------------------------------------------
[2010-01-29 13:18:15] salathe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
The broken namespace declaration has been removed from the example
code.
------------------------------------------------------------------------
[2010-01-29 13:17:26] svn@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=294200
Log: corrected broken example, fixes #50880
------------------------------------------------------------------------
[2010-01-29 11:47:48] kotnick at gmail dot com
Description:
------------
Example causes SimpleXML error on PHP 5.2.10.
Reproduce code:
---------------
---
From manual page: simplexmlelement.attributes#Examples
---
Expected result:
----------------
name="one"
game="lonely"
Actual result:
--------------
Warning: simplexml_load_string(): Entity: line 1: parser error :
Specification mandate value for attribute b in /home/kotnik/xmltest.php
on line 8
Call Stack:
0.0003 107144 1. {main}() /home/kotnik/xmltest.php:0
0.0003 107520 2. simplexml_load_string()
/home/kotnik/xmltest.php:8
Warning: simplexml_load_string(): <a xmlns:b> in
/home/kotnik/xmltest.php on line 8
Call Stack:
0.0003 107144 1. {main}() /home/kotnik/xmltest.php:0
0.0003 107520 2. simplexml_load_string()
/home/kotnik/xmltest.php:8
Warning: simplexml_load_string(): ^ in
/home/kotnik/xmltest.php on line 8
Call Stack:
0.0003 107144 1. {main}() /home/kotnik/xmltest.php:0
0.0003 107520 2. simplexml_load_string()
/home/kotnik/xmltest.php:8
Fatal error: Call to a member function attributes() on a non-object in
/home/kotnik/xmltest.php on line 9
Call Stack:
0.0003 107144 1. {main}() /home/kotnik/xmltest.php:0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50880&edit=1