Find element by its id.

        Parameters
        ----------
        element_id : str
            ID of the element to find

        Returns
        -------
        FigureElement
            one of the children element with the given ID.
544741
def find_id(self, element_id):
        """"""
        find = etree.XPath("//*[@id=$id]")
        return FigureElement(find(self.root, id=element_id)[0])
86844
def find(self,
             id,
             params=None,
             ):
        

        if params is None:
            params = {}

        if isinstance(id, tuple):
            path = self._resource.format(*id)
        else:
            path = self._resource.format(id)
        url = self._get_url(path)
        self._load(url, params=params)
824202
def get_slide(self, slide_id):
        
        for sldId in self._element.sldIdLst:
            if sldId.id == slide_id:
                return self.related_parts[sldId.rId].slide
        return None
838019
def find(self, id, **kwargs):
        
        return self.find_by(values={self.primary_key: id}, **kwargs)
251878
def find_elements(self, by=By.ID, value=None):
        
        if self._w3c:
            if by == By.ID:
                by = By.CSS_SELECTOR
                value = '[id="%s"]' % value
            elif by == By.TAG_NAME:
                by = By.CSS_SELECTOR
            elif by == By.CLASS_NAME:
                by = By.CSS_SELECTOR
                value = ".%s" % value
            elif by == By.NAME:
                by = By.CSS_SELECTOR
                value = '[name="%s"]' % value

        return self._execute(Command.FIND_CHILD_ELEMENTS,
                             {"using": by, "value": value})['value']
385858
def findElementsWithId(node, elems=None):
    
    if elems is None:
        elems = {}
    id = node.getAttribute('id')
    if id != '':
        elems[id] = node
    if node.hasChildNodes():
        for child in node.childNodes:
            # from http://www.w3.org/TR/DOM-Level-2-Core/idl-definitions.html
            # we are only really interested in nodes of type Element (1)
            if child.nodeType == Node.ELEMENT_NODE:
                findElementsWithId(child, elems)
    return elems
653267
def find(self, id):
        """"""
        for sprite in self.sprites:
            if sprite.id == id:
                return sprite

        for sprite in self.sprites:
            found = sprite.find(id)
            if found:
                return found
1121948
function getElementById(id) {
		var el = null;
		try {
			el = doc.getElementById(id);
		}
		catch (e) {}
		return el;
	}
226913
def find_by_tag_id(tag_id)
      @nodes.each do |node|
        if node.is_a?(ComponentNode)
          # Walk down nodes
          val = node.find_by_tag_id(tag_id)
          return val if val
        elsif node.is_a?(TagNode)
          # Found a matching tag
          return node if node.tag_id == tag_id
        end
      end

      nil
    end
1310315
def getElementById(self, node, id, default=join):
        """"""
        attrget = self.getAttr
        ELEMENT_NODE = node.ELEMENT_NODE
        for child in node.childNodes:
            if child.nodeType == ELEMENT_NODE:
                if attrget(child, 'id') == id:
                    return child
        if default is not join:
            return default
        raise KeyError, name
722633
private static Element findElement(Document document, String name) {
        Element result = null;

        List<Element> elementList = getElements(document);

        for (Element element : elementList) {
            if (element.getAttribute("id").equalsIgnoreCase(name) == true) {
                result = element;
                break;
            }
        }

        return result;
    }
523793
def _find(self, root, tagname, id=None):
        """"""
        if id is None:
            result = root.find('.//%s' % tagname)
            if result is None:
                raise LookupError('Cannot find any %s elements' % tagname)
            else:
                return result
        else:
            result = [
                elem for elem in root.findall('.//%s' % tagname)
                if elem.attrib.get('id', '') == id
            ]
            if len(result) == 0:
                raise LookupError('Cannot find a %s element with id %s' % (tagname, id))
            elif len(result) > 1:
                raise LookupError('Found multiple %s elements with id %s' % (tagname, id))
            else:
                return result[0]
1368716
def find_element_by_xpath(self, xpath):
        
        from sdklib.html.elem import Elem5lib

        return Elem5lib(self.html_obj.find(self._convert_xpath(xpath)))
89956
def fetch_new_id(self, ):
        
        parent = self.get_parent()
        if parent:
            others = parent._children
        else:
            others = [r for r in self.get_root()._reftracks if r.get_parent() is None]
        others = [r for r in others
                  if r != self
                  and r.get_typ() == self.get_typ()
                  and r.get_element() == self.get_element()]
        highest = -1
        for r in others:
            identifier = r.get_id()
            if identifier > highest:
                highest = identifier
        return highest + 1
933907
def get(self, id):
        
        for obj in self.model.db:
            if obj["id"] == id:
                return self._cast_model(obj)

        return None
558097
def getElementById(self, id: str) -> Optional[Node]:
        
        elm = getElementById(id)
        if elm and elm.ownerDocument is self:
            return elm
        return None
651236
def find_elements_by_xpath(self, xpath):
        
        from sdklib.html.elem import ElemLxml

        elements = self.html_obj.xpath(xpath)
        return [ElemLxml(e) for e in elements]