|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-10 17:37 UTC] iliaa@php.net
[2006-09-11 18:57 UTC] vondi at vondi dot no-ip dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
Description: ------------ Created a SimpleXMLObject with simplexml_load_string, then attempted to add a child to the empty node. However the the child node isn't created. Reproduce code: --------------- <? $str="<Connector></Connector>"; $xml=simplexml_load_string($str,'SimpleXMLElement'); $xml->Connector->addChild('test'); echo $xml->asXML(); ?> Expected result: ---------------- <?xml version="1.0"?> <Connector> <test></test> </Connector> -- or -- <?xml version="1.0"?> <Connector> <test /> </Connector> Actual result: -------------- <?xml version="1.0"?> <Connector/>