MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / removeAttributeNode

Method removeAttributeNode

base/poco/XML/src/Element.cpp:128–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127
128Attr* Element::removeAttributeNode(Attr* oldAttr)
129{
130 poco_check_ptr (oldAttr);
131
132 if (_pOwner->events())
133 dispatchAttrModified(oldAttr, MutationEvent::REMOVAL, oldAttr->getValue(), EMPTY_STRING);
134
135 if (oldAttr != _pFirstAttr)
136 {
137 Attr* pCur = _pFirstAttr;
138 while (pCur->_pNext != oldAttr) pCur = static_cast<Attr*>(pCur->_pNext);
139 if (pCur)
140 {
141 pCur->_pNext = static_cast<Attr*>(pCur->_pNext->_pNext);
142 }
143 else throw DOMException(DOMException::NOT_FOUND_ERR);
144 }
145 else _pFirstAttr = static_cast<Attr*>(_pFirstAttr->_pNext);
146 oldAttr->_pNext = 0;
147 oldAttr->_pParent = 0;
148 oldAttr->autoRelease();
149
150 return oldAttr;
151}
152
153
154Attr* Element::addAttributeNodeNP(Attr* oldAttr, Attr* newAttr)

Callers 3

removeNamedItemMethod · 0.80
removeNamedItemNSMethod · 0.80
removeRawMethod · 0.80

Calls 3

eventsMethod · 0.45
getValueMethod · 0.45
autoReleaseMethod · 0.45

Tested by

no test coverage detected