【发布时间】:2014-07-11 06:40:47
【问题描述】:
我正在尝试将我在 logacat 文件中收到的哈希码值转换为字符串表示形式。
我已经尝试了下面的代码。
final Element e = (Element)nodes_array.item(index);
final NodeList nodeKey = e.getElementsByTagName("key");
System.out.println(" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"+nodeKey.item(1).toString());
并在 logcat 文件中得到以下输出-
I/System.out(919): $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$org.apache.harmony.xml.dom.ElementImpl@b2dd54a0
【问题讨论】:
-
hashCode() 的结果只是一个整数。你想看这样的数字,还是想看你的对象的字符串表示?
-
字符串表示
-
如果我理解正确,请尝试使用这个,ethod developer.android.com/reference/org/w3c/dom/…