Java XML Node Text Value getTextContent(Node node)

Here you can find the source of getTextContent(Node node)

Description

Returns normalized text content for a node.

License

Apache License

Parameter

Parameter Description
node a parameter

Return

text content of child node, trimmed

Declaration

public static String getTextContent(Node node) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.*;

public class Main {
    /**/* w  ww . j av a 2  s .  co m*/
     * Returns normalized text content for a node.
     * @param node
     * @return text content of child node, trimmed
     */
    public static String getTextContent(Node node) {
        return node.getTextContent().trim();
    }
}

Related

  1. getTextContent(Node node)
  2. getTextContent(Node node)
  3. getTextContent(Node node)
  4. getTextContent(Node node)
  5. getTextContent(Node node)
  6. getTextContent(Node node)
  7. getTextContent(Node node)
  8. getTextContent(Node node)
  9. getTextContent(Node node)