ID:               32438
 User updated by:  franp at free dot fr
 Reported By:      franp at free dot fr
 Status:           Bogus
 Bug Type:         SimpleXML related
 Operating System: FreeBSD 4.11
 PHP Version:      5.0.3
 New Comment:

Could someone explain me how my PHp can be built "basically without DOM
support" but :

$doc = new DomDocument;   // Work OK
$doc->loadXML($result);   // Work OK
$s = simplexml_load_string($result);   // Work OK
$countNodes = count($s2->xpath('ancestor::*')); // Work OK
etc...
etc...

??

ALL DOM and SimpleXML functions DO Work !
ONLY $s = simplexml_import_dom($doc) FAILS !

It is hard to beleive my PHP was build without DOM support when ALL DOM
functions (except one) are working OK !


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

[2005-03-24 14:02:21] [EMAIL PROTECTED]

>--with-dom is used to add the old DOM XML to PHP 4, not to 
>PHP 5 (or am I wrong ?) .
yes, you're wrong. 
your PHP basically was built without DOM support, as it was said.

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

[2005-03-24 13:53:58] franp at free dot fr

Thinking of it again, I think you miss the point.
I am not talking of PHP 4, but PHP 5.
--with-dom is used to add the old DOM XML to PHP 4, not to PHP 5 (or am
I wrong ?) .

I am spkeaking of PHP 5.0.3 and the new built-in SimpleXML and DOM
functions.

So I re-explain what happens : all SimpleXML functions (and PHP5 XML
functions) work correctly, ONLY simplexml_import_dom() fails. That is
the strange point.

new DomDocument works ; simplexml_load_string() works, access to the
xml elements using the SimpleXML syntax (echo $s->racine->anelement)
works. But simple_import_dom() fails and only that.

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

[2005-03-24 13:20:23] franp at free dot fr

OK but then shouldn't you pass that to a documentation "bug" or "lack
of precision" ?

The current manual states :
"
CXIII. SimpleXML functions
Installation
The SimpleXML extension is enabled by default. To disable it, use the
--disable-simplexml configure option.
"

and

"
XXVII. DOM Functions
Installation 
There is no installation needed to use these functions; they are part
of the PHP core.
"

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

[2005-03-24 07:45:06] [EMAIL PROTECTED]

You haven't build ext/dom in. Just add --with-dom to your configure
line..


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

[2005-03-24 01:21:49] franp at free dot fr

Description:
------------
While all simplexml functions are working fine, simplexml_import_dom
just fails as if a non-existing function.

Reproduce code:
---------------
$doc = new DomDocument;
$doc->preserveWhiteSpace = TRUE;
        
$doc->loadXML($result);
        
$s = simplexml_load_string($result); // pass
        
$test = dom_import_simplexml($s); // pass
        
$s = simplexml_import_dom($doc); // broken ! 


Expected result:
----------------
Was working with PHP 5.0.0.
Apparently broke when passing to PHP 5.0.3.

Actual result:
--------------
Error code :
Fatal error: Call to undefined function simplexml_import_dom()


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


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

Reply via email to