@staticmethod
def _strip_elements(xml_str, element_names):
    """ Remove specified XML element nodes from the XML content.

        :param str xml_str:
        :param list element_names:
        :return: the list of lines
        :rtype: str
        """
    lines = []
    for line in xml_str.split('\n'):
        if len(line.strip()):
            found_it = False
            for key in element_names:
                if key in line:
                    found_it = True
                    break
            if not found_it:
                lines.append(line)
    return lines
