```
NodeList spanNode = (NodeList) xpath.evaluate("/widgets/widget[3]/node()", inputSource, XPathConstants.NODESET);
for(int i = 0; i < spanNode.getLength(); i++) {
Node node = spanNode.item(i);
if(node.getNodeType() == Node.TEXT_NODE) {
System.out.println(spanNode.item(i).getTextContent());
}
}
```
```
<?xml version="1.0" encoding="UTF-8" ?>
<widgets xmlns:prefix="
http://www.eclipse.org/birt/2005/design">
<widget>
<manufacturer/>
<dimensions/>
</widget>
<widget>
<manufacturer/>
<dimensions>101</dimensions>
<attr1 name="honey">10333</attr1>
</widget>
<widget>
<span>bbb</span>
aaa
<span>ccc</span>
</widget>
</widgets>
```