add method2dotStr (for the usage of xdotParser.py)