CXMLAttributeImpl::CXMLAttributeImpl(CXMLAttributesImpl& Attributes, TiXmlElement& Node, const std::string& strName) : m_ulID(INVALID_XML_ID), m_bUsingIDs(Attributes.IsUsingIDs()), m_Attributes(Attributes), m_Node(Node), m_Attribute(*new TiXmlAttribute(strName.c_str(), "")) { // Init and link it to the node m_bDeleteAttribute = true; Node.AddAttribute(m_Attribute); // Add us to parent list, if any m_Attributes.AddToList(this); // Add to array over XML stuff if (m_bUsingIDs) m_ulID = CXMLArray::PopUniqueID(this); }