| 82 | //======================= |
| 83 | |
| 84 | XMP_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 |