I am using dom4j to overwrite a value in the XML. The XML looks like this:
to select the three values, use:
//name[@time='555555']/element1/value
If that returns null as well, there may be a default namespace involved and that means you need to show your entire XML.
XPath is flexible, if you want you can express the same like this:
//value[ancestor::name[1]/@time='555555']