#NEWLINE# def pathname( self ) : #NEWLINE# #INDENT# 'pathname() returns the ElementNode as a string in xpath format.' #NEWLINE# if self . _attribs : #NEWLINE# #INDENT# s = map ( ( lambda it : ( "@%s='%s'" % it ) ) , self . _attribs . items ( ) ) #NEWLINE# return ( '%s[%s]' % ( self . __class__ . __name__ , ' and ' . join ( self ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . __class__ . __name__