ID:               31779
 Updated by:       [EMAIL PROTECTED]
 Reported By:      galg at sphera dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         DOM XML related
 Operating System: Linux
 PHP Version:      4.3.10
 New Comment:

Did you use the same libxml version while compiling PHP 4.3.8 and PHP
4.3.10 ?? What version do you use?




Previous Comments:
------------------------------------------------------------------------

[2005-01-31 16:06:24] galg at sphera dot com

Description:
------------
When I've used the following code on php 4.3.8:
The <![CDATA[ ]> section was returned as XML_CDATA_SECTION_NODE (value
4).

When i am running the same code on 4.3.10 its returned as XML_TEXT_NODE
(value 3).








Reproduce code:
---------------
<?php
$sXML = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<XML_DOC>
        <![CDATA[ something inside the CDATA.  ]]>
</XML_DOC>
XML;

print_r(domxml_xmltree($sXML));
?>

Expected result:
----------------
php 4.3.8 response:
=======================
domdocument Object
(
    [name] => #document
    [url] =>
    [version] => 1.0
    [encoding] => UTF-8
    [standalone] => -1
    [type] => 9
    [compression] => -1
    [charset] => 1
    [0] => 4
    [1] => 138008952
    [children] => Array
        (
            [0] => domelement Object
                (
                    [type] => 1
                    [tagname] => XML_DOC
                    [0] => 5
                    [1] => 138009088
                    [children] => Array
                        (
                            [0] => domtext Object
                                (
                                    [type] => 3
                                    [name] => #text
                                    [content] =>

                                    [0] => 6
                                    [1] => 138009160
                                )

                            [1] => domcdata Object
                                (
                                    [type] => 4
                                    [content] =>  something inside the
CDATA.
                                    [0] => 7
                                    [1] => 138009320
                                )

                            [2] => domtext Object
                                (
                                    [type] => 3
                                    [name] => #text
                                    [content] =>

                                    [0] => 8
                                    [1] => 138009416
                                )

                        )

                )

        )

)

Actual result:
--------------
php 4.3.10 response:
===========================
domdocument Object
(
    [name] => #document
    [url] =>
    [version] => 1.0
    [encoding] => UTF-8
    [standalone] => -1
    [type] => 9
    [compression] => -1
    [charset] => 1
    [0] => 4
    [1] => 138267176
    [children] => Array
        (
            [0] => domelement Object
                (
                    [type] => 1
                    [tagname] => XML_DOC
                    [0] => 5
                    [1] => 138267304
                    [children] => Array
                        (
                            [0] => domtext Object
                                (
                                    [type] => 3
                                    [name] => #text
                                    [content] =>
         something inside the CDATA.

                                    [0] => 6
                                    [1] => 138258296
                                )

                        )

                )

        )

)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31779&edit=1

Reply via email to