public function insertAt($index, $item)
{
if ($item instanceof TXmlElement) {
parent::insertAt($index, $item);
if ($item->getParent() !== null) {
$item->getParent()->getElements()->remove($item);
}
$item->setParent($this->_o);
} else {
throw new TInvalidDataTypeException('xmlelementlist_xmlelement_required');
}
}