标签: php simplexml nsxmlparser
可能重复: How do you rename a tag in SimpleXML through a DOM object?
How do I create a duplicate of an XML element, but change the name of the element and delete the original?
$copy = $sxml->dogs; unset($sxml->dogs); $sxml->canine = $copy; $sxml->canine->attributes()->type = "fiction";
我想知道我是否应该实际使用$sxml?
$sxml