(self, e_root)
return packages
Returns a list of etree elements containing STIX_Package elements

        Keyword arguments:
        e_root -- a root etree Element object
Returns a list of etree elements containing STIX_Package elements
Returns a list of etree elements containing STIX_Package elements
def _get_stix_package_list(self, e_root):
        """Returns a list of etree elements containing STIX_Package elements

        Keyword arguments:
        e_root -- a root etree Element object
        """
        tag_package = "{%s}STIX_Package" % (self.XML_NS_STIX)

        if e_root.tag == tag_package:
            packages = [e_root] # if the root element is a STIX_Package, return a list with it as the only item
        else:
            packages = e_root.findall(tag_package)

        return packages
def _get_stix_package_list ( self , e_root ) : tag_package = "{%s}STIX_Package" % ( self . XML_NS_STIX ) if e_root . tag == tag_package : packages = [ e_root ] # if the root element is a STIX_Package, return a list with it as the only item else : packages = e_root . findall ( tag_package ) return packages