Here you can find the source of getElementValue(Element element)
null
.
Parameter | Description |
---|---|
element | the element. |
public static String getElementValue(Element element)
//package com.java2s; /*/*from ww w . j a va 2 s . c om*/ * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; public class Main { /** * Returns the node value of the element's first child if there is any, * otherwise <code>null</code>. * * @param element the element. * @return the element's value. */ public static String getElementValue(Element element) { Node child = element.getFirstChild(); if (child != null) { return child.getNodeValue(); } return null; } }