SimpleXMLElement::addChild (PHP5>=5.1.3,PHP7) SimpleXMLElement::addChild-向XML节点添加一个子元素 描述 publicSimpleXMLElementSimpleXMLElement
('movie');$movie->addChild('title', 'PHP2: More Parser Stories');$movie->addChild('plot', 'This is all
addAttribute(string$name[,string$value[,string$namespace]]) publicSimpleXMLElementSimpleXMLElement::addChild
</c><c>stuff</c> 扩展内容 SimpleXMLElement::__toString()-返回字符串内容 BasicSimpleXMLusage ←SimpleXMLElement::addChild
publicarrayxpath(string$path) } 目录 SimpleXMLElement::addAttribute-向SimpleXML元素添加一个属性 SimpleXMLElement::addChild
updatePost);//添加"author"角色并赋予"createPost"权限$author=$auth->createRole('author');$auth->add($author);$auth->addChild