Java XML Node Text Value getSimpleNodeValue(Node node)

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

Description

get Simple Node Value

License

Open Source License

Declaration

public static String getSimpleNodeValue(Node node) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Document;

import org.w3c.dom.Node;

public class Main {
    public static String getSimpleNodeValue(Document doc, String nodeName) {
        return getSimpleNodeValue(doc.getElementsByTagName(nodeName).item(0));
    }//from w  w  w.  j av  a 2 s .c  o  m

    public static String getSimpleNodeValue(Node node) {
        return node.getChildNodes().item(0).getNodeValue();
    }
}

Related

  1. getPropertiesFromXML(Node propNode)
  2. getPropertiesFromXML(Node propNode)
  3. getPropText(Node node)
  4. getRawContent(Node n)
  5. getSimpleElementText(final Node node)
  6. getSingleNodeTextContent(Node node, String path)
  7. getStrElementValue(Node node)
  8. getString(final Node node, final String default_value)
  9. getString(Node node)