get Text Content from Node - Java XML

Java examples for XML:DOM Node Value

Description

get Text Content from Node

Demo Code


//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    public static String getTextContent(Node node) {
        if (node == null) {
            return null;
        }/*from   www .ja v  a2 s  .  c o  m*/
        return node.getTextContent();
    }
}

Related Tutorials