returns selected tagstring
170397
def get_selected_tag(self):
        """"""
        cols, _ = self.taglist.get_focus()
        tagwidget = cols.original_widget.get_focus()
        return tagwidget.tag
893403
@SuppressWarnings("unused")
		private String getTextValue(Element ele, String tagName) {
			String textVal = null;
			NodeList nl = ele.getElementsByTagName(tagName);
			if(nl != null && nl.getLength() > 0) {
				Element el = (Element)nl.item(0);
				textVal = el.getFirstChild().getNodeValue();
			}

			return textVal;
		}
289215
def value
      case tag_name
      when "select"
        if self[:multiple]
          selected_options.map { |option| option.value }
        else
          selected_option = @_node.selected_options.first
          selected_option ? Node.new(selected_option).value : nil
        end
      when "option"
        self[:value] || text
      when "textarea"
        @_node.getText
      else
        self[:value]
      end
    end
52950
def get(self, tags):
        """"""
        # Try to find our name
        value = tags.get(self.name, '')

        for name in self.alternate_tags:
            # Iterate of alternates until a non-empty value is found
            value = value or tags.get(name, '')

        # If we still have nothing, return our default
        value = value or self.default
        return value
948802
function getOpenTagParams(tag, tmplRule) {
  var pattern = tmplRule.openTagParams,
      matchArr,
      ret;

  while (matchArr = pattern.exec(tag)) {
    var key = matchArr[1];

    if (key === '/') {
      //If match to the last of "/", then continue the loop.
      continue;
    }

    if (!ret) {
      ret = [];
    }

    var value = matchArr[8],
        onlyBrace = matchArr[4] != null ? matchArr[4] : matchArr[6],
        onlyKey = false;

    if (value != null) {
      value = clearQuot(value); //Remove quotation marks
    } else {
      value = key; //Match to Similar to "checked" or "disabled" attribute.

      if (!onlyBrace) {
        onlyKey = true;
      }
    } //Removed at the end of "/>", ">" or "/".


    if (!matchArr[9] && !matchArr[10]) {
      if (/\/>$/.test(value)) {
        value = value.substr(0, value.length - 2);
      } else if (/>$/.test(value) || /\/$/.test(value)) {
        value = value.substr(0, value.length - 1);
      }
    } //Transform special key


    var hasColon = void 0;

    if (key[0] === ':') {
      key = key.substr(1);
      hasColon = true;
    }

    ret.push({
      key: key,
      value: value,
      onlyBrace: onlyBrace,
      hasColon: hasColon,
      onlyKey: onlyKey
    });
  }

  return ret;
}
1236405
def get_tag(self, tagname, tagidx):
        
        return '%s=%s' % (tagname, decode(getattr(self, tagname)[tagidx]))
951843
def _get_tag(self, name):
        """"""
        if name.endswith("_"):
            if name[:-1] in self._schema.reserved:
                return name[:-1]
        return name
759431
def from_str(cls, tagstring):
        
        m = cls._parse_regexp.match(tagstring)
        return cls(name=m.group('name'), value=m.group('value'), vendor=m.group('vendor'))
620930
function getTagValues(littleEndian, dirEntries) {
        var TAG_VAL_OFFSET = 16,
            tagsToFind = qq.extend([], TAG_IDS),
            vals = {};

        qq.each(dirEntries, function(idx, entry) {
            var idHex = entry.slice(0, 4),
                id = littleEndian ? parseLittleEndian(idHex) : parseInt(idHex, 16),
                tagsToFindIdx = tagsToFind.indexOf(id),
                tagValHex, tagName, tagValLength;

            if (tagsToFindIdx >= 0) {
                tagName = TAG_INFO[id].name;
                tagValLength = TAG_INFO[id].bytes;
                tagValHex = entry.slice(TAG_VAL_OFFSET, TAG_VAL_OFFSET + (tagValLength * 2));
                vals[tagName] = littleEndian ? parseLittleEndian(tagValHex) : parseInt(tagValHex, 16);

                tagsToFind.splice(tagsToFindIdx, 1);
            }

            if (tagsToFind.length === 0) {
                return false;
            }
        });

        return vals;
    }
468450
def get_tag_value(resource, tag, utf_8=False):
        """"""

        tags = {k.lower(): v for k, v in resource.get('tags', {}).items()}
        value = tags.get(tag, False)

        if value is not False:
            if utf_8:
                value = value.encode('utf8').decode('utf8')
        return value
1350666
def parse_singular_string(t, tag_name):
    ''''''
    pos = t.getElementsByTagName(tag_name)
    assert(len(pos) == 1)
    pos = pos[0]
    assert(len(pos.childNodes) == 1)
    return pos.childNodes[0].data
356341
public String getSelectedLabel() {
        List<WebElement> options = getElement().findElements(By.tagName("option"));
        for (WebElement option : options) {
            if (option.isSelected()) {
                return option.getText();
            }
        }
        return null;
    }
756402
def get_tag_html(tag_id):
    
    tag_data = get_lazy_tag_data(tag_id)
    tag = tag_data['tag']
    args = tag_data['args']
    kwargs = tag_data['kwargs']
    lib, tag_name = get_lib_and_tag_name(tag)

    args_str = ''
    if args:
        for arg in args:
            if isinstance(arg, six.string_types):
                args_str += "'{0}' ".format(arg)
            else:
                args_str += "{0} ".format(arg)

    kwargs_str = ''
    if kwargs:
        for name, value in kwargs.items():
            if isinstance(value, six.string_types):
                kwargs_str += "{0}='{1}' ".format(name, value)
            else:
                kwargs_str += "{0}={1} ".format(name, value)

    html = '{{% load {lib} %}}{{% {tag_name} {args}{kwargs}%}}'.format(
        lib=lib, tag_name=tag_name, args=args_str, kwargs=kwargs_str)

    return html
842273
def selection_text=(str)
      from = [@text_input.selection_start, @text_input.caret_pos].min
      to = [@text_input.selection_start, @text_input.caret_pos].max
      new_length = str.length

      full_text = text
      tags_length_before = (0...from).inject(0) {|m, i| m + @tags[i].length }
      tags_length_inside = (from...to).inject(0) {|m, i| m + @tags[i].length }
      range = (selection_range.first + tags_length_before)...(selection_range.last + tags_length_before + tags_length_inside)
      full_text[range] = str.encode('UTF-8', undef: :replace)
      @text_input.text = full_text

      @text_input.selection_start = @text_input.caret_pos = from + new_length

      recalc # This may roll back the text if it is too long!

      publish :changed, self.text

      str
    end
413312
public String getTextDescription(String encodedValue) {
    if (forceDescription != null) {
      return forceDescription;
    }
    String desc = null;
    if (tagValueDescriptions.containsKey(encodedValue)) {
      desc = tagValueDescriptions.get(encodedValue);
    }
    return desc;
  }
368605
function selectedHTML(editor) {
    restoreRange(editor);
    var range = getRange(editor);
    if (ie)
      return range.htmlText;
    var layer = $("<layer>")[0];
    layer.appendChild(range.cloneContents());
    var html = layer.innerHTML;
    layer = null;
    return html;
  }
541128
function getTag(val) {
  const tag = Object.prototype.toString.call(val).slice(8, -1)

  if (basicTypes.includes(tag.toLowerCase())) {
    return tag.toLowerCase()
  }

  return tag
}