Here you can find the source of getStringValues(Element from, String elementName)
public static List<String> getStringValues(Element from, String elementName)
//package com.java2s; import java.util.LinkedList; import java.util.List; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class Main { public static List<String> getStringValues(Element from, String elementName) { List<String> values = new LinkedList<String>(); NodeList nodes = from.getElementsByTagName(elementName); if (nodes != null) { for (int i = 0; i < nodes.getLength(); i++) { values.add(nodes.item(i).getChildNodes().item(0).getNodeValue()); }//www . j av a 2s. c om } return values; } }