ID:               27436
 Updated by:       [EMAIL PROTECTED]
 Reported By:      greg dot steffensen at richmond dot edu
-Status:           Open
+Status:           Closed
 Bug Type:         XML related
 Operating System: Windows XP Service Pack 1
 PHP Version:      5.0.0b4 (beta4)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2004-02-29 03:44:06] greg dot steffensen at richmond dot edu

Description:
------------
dom_import_simplexml(), when given a simplexml_element that is part of
a larger simplexml nesting, will import the parent of the element
provided, not the element itself.  

Reproduce code:
---------------
<?

$dom = new domdocument;

$s = simplexml_load_string('<a>Foo<b>Bar<c/></b></a>');

$el = dom_import_simplexml($s->b->c);

$el = $dom->importNode($el, TRUE);

$dom->appendChild($el);

print $dom->saveXML();

?>



Expected result:
----------------
<?xml version="1.0"?>

<c/>

Actual result:
--------------
<?xml version="1.0"?>

<b>Bar<c/></b>




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


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

Reply via email to