public function offsetUnset($offset) { if ($this->isNodeOffset($offset)) { $this->removeChild($this->childNodes->item((int) $offset)); } else { $this->removeAttribute($offset); } }