我应该在代码中使用xml还是“simplexml”?

时间:2011-08-03 13:43:54

标签: 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

0 个答案:

没有答案