def getChildElementsByTagName(self, tagName):
 result = []
 for child in self.childNodes:
  if isinstance(child, Element):
   if (child.tagName == tagName):
    result.append(child)
 return result

def getChildElementsByTagName ( self , tagName ) : result = [ ] for child in self . childNodes : if isinstance ( child , Element ) : if ( child . tagName == tagName ) : result . append ( child ) return result
return child elements of type tagname if found .