// This is the way we always did it before, so keep doing it that way
// as xpath.evaluate() will return non-string results (like Doubles)
// for some scenarios.
if (outputType == null && singleResult)
{
return xpath.valueOf(doc);
}
// TODO handle non-list cases, see
//http://www.dom4j.org/apidocs/org/dom4j/XPath.html#evaluate(java.lang.Object)
Object obj = xpath.evaluate(doc);