public static String[] textForTag(Element element, String tag) {
		if (!element.hasChildNodes())
			return new String[0]; // Should never happen if we are passed a
									// valid Element node

		NodeList tagList = element.getChildNodes();
		int tagCount = tagList.getLength();
		if (0 == tagCount) // No tags by that name
			return new String[0];

		Vector<String> strings = new Vector<String>(); // Same up all the text
														// strings

		for (int j = 0; j < tagCount; ++j) {
			Node tagNode = tagList.item(j);

			if (isMatchingNode(tagNode, tag)) {
				// Look at the children of this tag element. There should be
				// one or more Text nodes.

				NodeList list = tagNode.getChildNodes();
				int count = list.getLength();
				for (int i = 0; i < count; ++i) {
					Node node = list.item(i);
					if (node instanceof Text) {
						String value = trim((Text) node);
						if (!("".equals(value)))
							strings.addElement(value);
					}
				} // for i...
			} // if match
		} // for j...

		String[] stringArray = new String[strings.size()];
		strings.copyInto(stringArray);
		return stringArray;
	}