unsigned long AttrMap::length() const { unsigned long result = 0; AbstractNode* pAttr = _pElement->_pFirstAttr; while (pAttr) { pAttr = static_cast<AbstractNode*>(pAttr->nextSibling()); ++result; } return result; }
Node* AttrMap::item(unsigned long index) const { AbstractNode* pAttr = _pElement->_pFirstAttr; while (index-- > 0 && pAttr) pAttr = static_cast<AbstractNode*>(pAttr->nextSibling()); return pAttr; }