mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
Fix to addElement
This commit is contained in:
parent
cf1ad6d8eb
commit
ec5159a8f4
1 changed files with 5 additions and 0 deletions
|
@ -141,6 +141,11 @@ class DocumentTypeImpl : public DOM::DocumentType_impl<stringT>,
|
|||
|
||||
void addElement(SimpleDOM::ElementImpl<stringT, string_adaptorT>* element)
|
||||
{
|
||||
if(elements_.getNamedItem(element->getNodeName()) != 0)
|
||||
{
|
||||
delete element;
|
||||
return; // already have an element decl for it
|
||||
} // if ...
|
||||
element->setOwnerDoc(ownerDoc_);
|
||||
elements_.setNamedItem(element);
|
||||
} // addElements
|
||||
|
|
Loading…
Reference in a new issue