def get_tag(el): """ :returns: `geographic_msgs/KeyValue`_ message for `<tag>` *el* if any, None otherwise. """ pair = None key = el.get('k') if key != None: pair = KeyValue() pair.key = key pair.value = get_required_attribute(el, 'v') return pair
def get_tag(el): """ Get a KeyValue pair from a <tag> element. :returns: KeyValue pair if any, None otherwise. """ pair = None key = el.get('k') if key != None: pair = KeyValue() pair.key = key pair.value = get_required_attribute(el, 'v') return pair