Hope you have a good day.
The Dom4j javadoc form Node.selectObject(String xpathExpression) says the following:
...The object returned can either be a List of one or more Node instances or a scalar object like a String or a Number instance depending on the XPath expression.
However when I try to get a list of String on this piece of xml:
<root>
...
<level1>
<property>pro1</property>
<property>pro1</property>
<property>pro1</property>
<level1>
...
</root>
with the following code:
List result = document.selectObject("/root/level1/property/text()")
I get a list of org.dom4j.tree.DefaultText objet. Of course I can iterate on the list but I yould like to know if there is a way to get a list of String.