getElementsByTagName - Gets elements within this collection having a specific tag name

            @param tagName - String of tag name

            @return - TagCollection of unique elements within this collection with given tag name
977520
def getElementsByTagName(self, tagName):
        '''
            
        '''
        ret = TagCollection()
        if len(self) == 0:
            return ret

        tagName = tagName.lower()
        _cmpFunc = lambda tag : bool(tag.tagName == tagName)
        
        for tag in self:
            TagCollection._subset(ret, _cmpFunc, tag)

        return ret
212529
def getElementsByName(self, name):
        '''
            
        '''
        ret = TagCollection()
        if len(self) == 0:
            return ret
        _cmpFunc = lambda tag : bool(tag.name == name)
        for tag in self:
            TagCollection._subset(ret, _cmpFunc, tag)

        return ret
1107785
public <T extends AbstractJaxb> T getByName(String name, Class<T> tagType) {
        return GetByNameUtil.getByName((T) this, name, tagType);
    }
281077
function getTag(entry, tagName) {
  var parsed = entry.parsed;
  return _.find(parsed.tags, ['title', tagName]) || null;
}
238157
public static Tags of(@Nullable Iterable<? extends Tag> tags) {
        if (tags == null || !tags.iterator().hasNext()) {
            return Tags.empty();
        } else if (tags instanceof Tags) {
            return (Tags) tags;
        } else if (tags instanceof Collection) {
            Collection<? extends Tag> tagsCollection = (Collection<? extends Tag>) tags;
            return new Tags(tagsCollection.toArray(new Tag[0]));
        } else {
            return new Tags(StreamSupport.stream(tags.spliterator(), false).toArray(Tag[]::new));
        }
    }
1217599
function( tagName, text ){
			var node = this.document.createElement(tagName);
			node.innerHTML = text;
			return node;
		}
1015720
private static Elements getElementsByTag(Element e, String tag) {
        Elements es = e.getElementsByTag(tag);
        es.remove(e);
        return es;
    }
1292384
public static Set<String> getTagSet(String tags) {
		tags = StringUtils.substringBefore(tags, "\n");
		String[] tagArr = tags.split("[\\s,，;；]");
		Set<String> tagSet = new HashSet<String>();
		for (int i = 0; i < tagArr.length; i++) {
			String tag = tagArr[i].trim();
			if (!tag.isEmpty()) {
				tagSet.add(tag);
			}
		}
		return tagSet;
	}
521974
public function getNodeByTagName($tagName)
    {
        $result = [];

        foreach ($this as $node) {
            if ($node->tagName === $tagName) {
                $result[] = $node;
            }
        }

        return $result;
    }
628487
protected List<Element> filterChildren(Element parent, String tagName)
    {
        List<Element> result = new ArrayList<Element>();
        Node current = parent.getFirstChild();
        while (current != null) {
            if (current.getNodeName().equals(tagName)) {
                result.add((Element) current);
            }
            current = current.getNextSibling();
        }
        return result;
    }
352240
protected Element findTag(String tagName, Element element) {
        Node result = element.getFirstChild();
        
        while (result != null) {
            if (result instanceof Element
                    && (tagName.equals(((Element) result).getNodeName()) || tagName
                            .equals(((Element) result).getLocalName()))) {
                break;
            }
            result = result.getNextSibling();
        }
        
        return (Element) result;
    }
1100072
public static List<Element> getElements(Element element, String tagName) {
		final NodeList nodeList = StrUtil.isBlank(tagName) ? element.getChildNodes() : element.getElementsByTagName(tagName);
		return transElements(element, nodeList);
	}
1208292
public static Element createElement(String tagName, String id) {
		return IMPL.createElement(tagName, id);
	}
582092
public Collection<Xml> getChildren(String name)
    {
        Check.notNull(name);

        final Collection<Xml> nodes = new ArrayList<>(1);
        final NodeList list = root.getChildNodes();
        for (int i = 0; i < list.getLength(); i++)
        {
            final Node node = list.item(i);
            if (name.equals(node.getNodeName()))
            {
                nodes.add(new Xml(document, (Element) node));
            }
        }
        return nodes;
    }
777438
public String getTagValue(String tagName) {

        Tag[] tags = getTagMap().get(tagName);
        if (tags == null || tags.length == 0) {
            return null;
        }

        return tags[tags.length - 1].getText();
    }
637362
public <T extends AbstractJaxb> List<T> getByNameAsList(String name, Class<T> tagType) {
        return GetByNameUtil.getByNameAsList((T) this, new ArrayList<T>(), name,tagType);
    }
744514
public static Element getElement(Element element, String tagName) {
		final NodeList nodeList = element.getElementsByTagName(tagName);
		if (nodeList == null || nodeList.getLength() < 1) {
			return null;
		}
		int length = nodeList.getLength();
		for (int i = 0; i < length; i++) {
			Element childEle = (Element) nodeList.item(i);
			if (childEle == null || childEle.getParentNode() == element) {
				return childEle;
			}
		}
		return null;
	}