From:             mc at genetech dot co dot za
Operating system: Windows XP SP1
PHP version:      5.0.1
PHP Bug Type:     DOM XML related
Bug description:  dom_import_simplexml() doesn't behave as expected

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 bug report at http://bugs.php.net/?id=29655&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29655&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29655&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29655&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29655&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29655&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29655&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29655&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29655&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29655&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29655&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29655&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29655&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29655&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29655&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29655&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29655&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29655&r=float

Reply via email to