code: public static String getOnlyTextContent(NodeList list) throws XMLRPCException {
  
  		StringBuilder builder = new StringBuilder();
  		Node n;
  
  		for(int i = 0; i < list.getLength(); i++) {
  			n = list.item(i);
  
  			// Skip comments inside text tag.
  			if(n.getNodeType() == Node.COMMENT_NODE) {
  				continue;
  			}
  
  			if(n.getNodeType() != Node.TEXT_NODE) {
  				throw new XMLRPCException("Element must contain only text elements.");
  			}
  
  			builder.append(n.getNodeValue());
  
  		}
  
  		return builder.toString();
  
  	}
docs: Returns the text node from a given NodeList. If the list contains
  more then just text nodes, an exception will be thrown.
  
  @param list The given list of nodes.
  @return The text of the given node list.
  @throws XMLRPCException Will be thrown if there is more than just one
  text node within the list.