<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_201" class="java.beans.XMLDecoder">
<object class="com.labs.crud.classes.Order">
<void property="id">
<int>1</int>
</void>
<object>
...
</object>
</object>
<object class="com.labs.crud.classes.Order">
<void property="id">
<int>2</int>
</void>
<object>
...
</object>
</object>
</java>
NodeList nodes = doc.getElementsByTagName("java").item(0)
.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
if (nodes.item(i).getNodeName().equals("object")) {
System.out.println(nodes.item(i).getNodeName());
}
}