MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / GetNamedElement

Method GetNamedElement

xmpsdk/src/XML_Node.cpp:169–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167//==========================
168
169XML_NodePtr XML_Node::GetNamedElement ( XMP_StringPtr nsURI, XMP_StringPtr localName, size_t which /* = 0 */ )
170{
171
172 for ( size_t i = 0, vLim = this->content.size(); i < vLim; ++i ) {
173 XML_Node * childPtr = this->content[i];
174 if ( childPtr->ns != nsURI ) continue;
175 if ( strcmp ( localName, childPtr->name.c_str()+childPtr->nsPrefixLen ) != 0 ) continue;
176 if ( which == 0 ) return childPtr;
177 --which;
178 }
179
180 return 0; /// Not found.
181
182} // XML_Node::GetNamedElement
183
184// =================================================================================================
185// DumpNodeList

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected