Parse a resource

        :param resource: Element representing the text inventory
        :param _cls_dict: Dictionary of classes to generate subclasses

def parse(cls, resource):
        """ Parse a resource

        :param resource: Element representing the text inventory
        :param _cls_dict: Dictionary of classes to generate subclasses
        """
        xml = xmlparser(resource)
        o = cls(name=xml.xpath("//ti:TextInventory", namespaces=XPATH_NAMESPACES)[0].get("tiid") or "")
        # Parse textgroups
        _xpathDict(xml=xml, xpath='//ti:textgroup', cls=cls.CLASS_TEXTGROUP, parent=o)
        return o