mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +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)
|
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_);
|
element->setOwnerDoc(ownerDoc_);
|
||||||
elements_.setNamedItem(element);
|
elements_.setNamedItem(element);
|
||||||
} // addElements
|
} // addElements
|
||||||
|
|
Loading…
Add table
Reference in a new issue