Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    /**
     * Extracts a String from a Document consisting entirely of a String.
     * 
     * @return the String
     */
    public static String extractString(Node d) {
        if (d == null) {
            return null;
        }
        return d.getFirstChild().getTextContent();
    }
}