element = $element; } function setAttribute($name, $value) { $this->element->setAttribute($name, $value); } //this function needs to catch exceptions & return FALSE if one happens, to match behavior of the PHP 4 version function appendChild($newNode) { $this->element->appendChild($newNode->getElement()); return $newNode; } function getElement() { return $this->element; } } ?>