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

Method GetAttrValue

xmpsdk/src/XML_Node.cpp:84–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82//=======================
83
84XMP_StringPtr XML_Node::GetAttrValue ( XMP_StringPtr attrName ) const
85{
86
87 for ( size_t i = 0, aLim = this->attrs.size(); i < aLim; ++i ) {
88 XML_Node * attrPtr = this->attrs[i];
89 if ( ! attrPtr->ns.empty() ) continue; // This form of GetAttrValue is for attrs in no namespace.
90 if ( attrPtr->name == attrName ) return attrPtr->value.c_str();
91 }
92
93 return 0; // Not found.
94
95} // XML_Node::GetAttrValue
96
97// =================================================================================================
98// XML_Node::SetAttrValue

Callers

nothing calls this directly

Calls 3

c_strMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected