return node.getText();
if (value instanceof List) { List list = (List) value; value = list.get(0); }  if (value instanceof Node) { Node node = (Node) value; return node.getText(); } else if (value instanceof String) { return (String) value; } else if (value instanceof Number) { String s = value.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); return s; } else throw new IllegalStateException("Unexpected object returned from xpath query: " + value);
		public String getInstanceValue(Element element) throws MissingNodeException {			Node node = element.selectSingleNode(xpath);			if (node == null)				throw new MissingNodeException("Could not get value from element (path=" +					xpath + ")");			return node.getText();		}