def get_xpath(self, type, instance=True):
"""<STR_LIT>"""<EOL>def convert(default_ns, nodes, type):<EOL><INDENT>ret = '<STR_LIT>'<EOL>for index, node in enumerate(nodes):<EOL><INDENT>default_ns, id = self.device.convert_tag(default_ns, node.tag,<EOL>dst=type)<EOL>ret += '<STR_LIT:/>' + id<EOL>if self.is_config and type != Tag.YTOOL:<EOL><INDENT>n = Composer(self.device, node)<EOL>if n.schema_node is not None:<EOL><INDENT>if n.schema_node.get('<STR_LIT:type>') == '<STR_LIT>' andnot (index == len(nodes)-<NUM_LIT:1> and not instance):<EOL><INDENT>ret += '<STR_LIT>'.format(node.text)<EOL><DEDENT>elif n.schema_node.get('<STR_LIT:type>') == '<STR_LIT:list>' andnot (index == len(nodes)-<NUM_LIT:1> and not instance):<EOL><INDENT>for key in n.keys:<EOL><INDENT>id = self.device.convert_tag(default_ns, key,<EOL>dst=type)[<NUM_LIT:1>]<EOL>ret += '<STR_LIT>'.format(id,<EOL>node.find(key).text)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>return ret<EOL><DEDENT>nodes = list(reversed(list(self.node.iterancestors())))[<NUM_LIT:1>:] +[self.node]<EOL>if type == Tag.YTOOL:<EOL><INDENT>return self.model_name + convert(self.model_ns, nodes, type)<EOL><DEDENT>else:<EOL><INDENT>return convert('<STR_LIT>', nodes, type)<EOL><DEDENT>
get_xpath

        High-level api: Delete four attributes from an Element node if they
        exist: operation, insert, value and key.

        Parameters
        ----------

        element : `Element`
            The Element node needs to be looked at.

        Returns
        -------

        Element
            The Element node is returned after processing.