Java tutorial
//package com.java2s; import org.w3c.dom.*; public class Main { /** * Get the body value of a node */ public static String getNodeBodyValue(Node child) { String bodyValue = ""; NodeList bodies = child.getChildNodes(); for (int j = 0; j < bodies.getLength(); j++) { bodyValue += bodies.item(j).getNodeValue(); } return bodyValue; } }