|
PHP5中文手册
SimpleXMLElement->addChild()(PHP 5 >= 5.1.3) SimpleXMLElement->addChild() — Adds a child element to the XML node 说明SimpleXMLElement
SimpleXMLElement addChild
( string $name
[, string $value
[, string $namespace
]] )
Adds a child element to the node and returns a SimpleXMLElement of the child. 参数
返回值The addChild method returns a SimpleXMLElement object representing the child added to the XML node. 范例
Example#1 Add attributes and children to a SimpleXML element
<?php |