Code: Select all
$arr = $this->_dom->getElementsByTagName('group');
$obj = $arr->item(0); // Get the first group Node?
$tmp = $obj->createElement('item');
//$tmp->setAttribute($name1, $value1);
//$tmp->setAttribute($name2, $value2);
//$obj->appendChild($tmp);Code: Select all
Fatal error: Call to undefined method DOMElement::createElement() inCode: Select all
<package>
<group>
</group>
<group>
</group>
</package>Can anyone see anything obviously wrong with the code?