Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.*;

public class Main {
    public static String getNodeValue(Node node) {
        String ret = "";
        if (node != null) {
            for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling())
                ret = (new StringBuilder(String.valueOf(ret))).append(child.getNodeValue()).toString();

        }
        return ret;
    }
}