#29655 [Opn->Bgs]: dom_import_simplexml() doesn't behave as expected
| From: | rrichards@php.net | Date: | Fri, 13 Aug 2004 16:05:42 +0000 |
| Subject: | #29655 [Opn->Bgs]: dom_import_simplexml() doesn't behave as expected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64565@lists.php.net to get a copy of this message | ||
ID: 29655
Updated by: rrichards@php.net
Reported By: mc at genetech dot co dot za
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: Windows XP SP1
PHP Version: 5.0.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
it returns the current simplexml node as a domelement
Previous Comments:
------------------------------------------------------------------------
[2004-08-13 17:06:56] mc at genetech dot co dot za
Description:
------------
dom_import_simplexml() as described in the following document:
http://www.zend.com/php5/articles/php5-xmlphp.php#Heading16,
is meant to return a DOMDocument, but instead returns a DOMElement.
Reproduce code:
---------------
<?php
$xml_file = "moo.xml";
$schema_file = "boo.xsd";
$src = simplexml_load_file($xml_file);
$dom = dom_import_simplexml($src);
$dom->schemaValidate($schema_file);
?>
Expected result:
----------------
A validation message based on the XML schema file and the XML instance
file.
Actual result:
--------------
Output: Fatal error: Call to undefined method
DOMElement::schemaValidate()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29655&edit=1