When I try root.getChildNodes().toString(), I do not get the result I am looking for.
posted 10 years ago
You probably are looking for an XML file to a string, if I am not mistaken. If that is the case, then you can use any Java I/O API to do this.
Converting an XML Node to a string means, converting the "value" of an XML Node to a string. BTW, an XML Node means - an XML Element, or an XML attribute or just simply the text inside an XML file. The "value" each such node depends on what type of Node it is.