unsigned Document<Formatter>::FindAttribute(StringSection<value_type> name) const { if (_attributes.empty()) return ~0u; for (auto a=_firstRootAttribute; a!=~0u;) { const auto& attrib = _attributes[a]; if (XlEqString(attrib._name, name)) return a; a=attrib._nextSibling; } return ~0u; }
unsigned DocElementHelper<Formatter>::FindAttribute(StringSection<value_type> name) const { assert(_index != ~0u); auto& ele = _doc->_elements[_index]; for (unsigned a=ele._firstAttribute; a!=~0u;) { const auto& attrib = _doc->_attributes[a]; if (XlEqString(attrib._name, name)) return a; a=attrib._nextSibling; } return ~0u; }