Java examples for XML:DOM Node Value
get Contents from XML Node
//package com.java2s; import org.w3c.dom.Node; public class Main { public static String getContents(Node node) { String s = node.getChildNodes().item(0).getTextContent(); if (s != null) { return s.trim(); }//from w w w . j a v a2s .c o m return null; } }