Here you can find the source of getTextValue(Element element, String tagName)
Parameter | Description |
---|---|
element | a parameter |
tagName | a parameter |
public static String getTextValue(Element element, String tagName)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { /**//w w w . j a v a 2s. c o m * Get the Text value * @param element * @param tagName * @return String value */ public static String getTextValue(Element element, String tagName) { return element.getElementsByTagName(tagName).item(0).getChildNodes().item(0).getNodeValue().trim(); } }