Java examples for XML:DOM Node
Returns normalized text content for XML node.
//package com.java2s; import org.w3c.dom.*; public class Main { /**// w w w. j a v a 2 s . c o m * Returns normalized text content for a node. * @param node * @return text content of child node, trimmed */ public static String getTextContent(Node node) { return node.getTextContent().trim(); } }