Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.jsoup.nodes.*;

public class Main {
    private static boolean preserveWhitespace(Node node) {
        // looks only at this element and one level up, to prevent recursion & needless stack searches
        if (node != null && node instanceof Element) {
            Element element = (Element) node;
            return element.tag().preserveWhitespace()
                    || element.parent() != null && element.parent().tag().preserveWhitespace();
        }
        return false;
    }
}