Here you can find the source of getTrimmedText (final Node node)
public static String getTrimmedText (final Node node)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file import org.w3c.dom.Node; public class Main { public static String getTrimmedText(final Node node) { return node.getTextContent().trim(); }/* ww w. jav a 2 s . c om*/ }