Here you can find the source of getTextContent(Element node)
public static String getTextContent(Element node)
//package com.java2s; //License from project: Apache License import org.jsoup.nodes.*; public class Main { /**//from w w w.j ava 2 s .c o m * getTextContent avoid NullReferenceException */ public static String getTextContent(Element node) { return (node == null) ? null : node.text(); } }