I have a given xml structured like this:
<elem>
<val id="1">aaa</val>
<val id="2">bbb</val>
</elem>
With SAXReader (DOM4J), how can I get the value contained into the node with id = 1 ('aaa' in the example)?
I've tried this:
String value = elem.element("val[@id='1']")
where elem is the right "path.current", but it didn't work.
Probably I'm writing the condition with a wrong syntax.. suggestions?