Here you can find the source of valueOf(Node x)
public static String valueOf(Node x)
//package com.java2s; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static String valueOf(Node x) { if (x != null) { NodeList nodes = x.getChildNodes(); String result = ""; for (int i = 0; i < nodes.getLength(); i++) { Node m = nodes.item(i); result += m.getNodeValue(); }/*from w w w . j av a 2 s .com*/ return result; } return null; } }