#28207 [Fbk->NoF]: Wrong output in PHP 5 with XML Parser Functions
| From: | php-bugs at lists dot php dot net | Date: | Thu, 03 Feb 2005 00:00:08 +0000 |
| Subject: | #28207 [Fbk->NoF]: Wrong output in PHP 5 with XML Parser Functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73294@lists.php.net to get a copy of this message | ||
ID: 28207
Updated by: php-bugs@lists.php.net
Reported By: bart at mediawave dot nl
-Status: Feedback
+Status: No Feedback
Bug Type: XML related
Operating System: Windows 2000
PHP Version: 5.0.0RC2
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2005-01-26 04:51:36] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-04-28 17:18:12] bart at mediawave dot nl
Description:
------------
The stream-oriented XML parser (formerly Expat) produces different
output in PHP 5 than it did in PHP 4. I'm unable to read the
<?xml version='1.0'?>
<!DOCTYPE chapter SYSTEM "/just/a/test.dtd" [
<!ENTITY plainEntity "FOO entity">
<!ENTITY systemEntity SYSTEM "xmltest2.xml">
]>
section of the XML document with PHP 5.
Reproduce code:
---------------
The code under "Example 3. External Entity Example" at
http://www.php.net/manual/en/ref.xml.php
Expected result:
----------------
<?xml version='1.0'?>
<!DOCTYPE chapter SYSTEM "/just/a/test.dtd" [
<!ENTITY plainEntity "FOO entity">
<!ENTITY systemEntity SYSTEM "xmltest2.xml">
]>
<CHAPTER>
<TITLE>Title &plainEntity;</TITLE>
<PARA>
<INFORMALTABLE>
<TGROUP COLS="3">
<TBODY>
<ROW><ENTRY>a1</ENTRY><ENTRY
MOREROWS="1">b1</ENTRY><ENTRY>c1</ENTRY></ROW>
<ROW><ENTRY>a2</ENTRY><ENTRY>c2</ENTRY></ROW>
<ROW><ENTRY>a3</ENTRY><ENTRY>b3</ENTRY><ENTRY>c3</ENTRY></ROW>
</TBODY>
</TGROUP>
</INFORMALTABLE>
</PARA>
<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY testEnt "test entity">
]>
<FOO>
<ELEMENT ATTRIB="value"></ELEMENT>
&testEnt;
This is some more PHP code being executed.
</FOO>
<SECTION ID="about">
<TITLE>About this Document</TITLE>
<PARA>
<!-- this is a comment -->
Hi! This is PHP version 4.3.6
</PARA>
</SECTION>
</CHAPTER>
parse complete
Actual result:
--------------
&plainEntity;<CHAPTER>
<TITLE>Title &plainEntity;</TITLE>
<PARA>
<INFORMALTABLE>
<TGROUP COLS="3">
<TBODY>
<ROW><ENTRY>a1</ENTRY><ENTRY
MOREROWS="1">b1</ENTRY><ENTRY>c1</ENTRY></ROW>
<ROW><ENTRY>a2</ENTRY><ENTRY>c2</ENTRY></ROW>
<ROW><ENTRY>a3</ENTRY><ENTRY>b3</ENTRY><ENTRY>c3</ENTRY></ROW>
</TBODY>
</TGROUP>
</INFORMALTABLE>
</PARA>
&systemEntity;
<SECTION ID="about">
<TITLE>About this Document</TITLE>
<PARA>
<-- this is a comment -->
Hi! This is PHP version 5.0.0RC2
</PARA>
</SECTION>
</CHAPTER>XML error: Undeclared entity warning at line 27
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28207&edit=1