import org.apache.xerces.parsers.DOMParser;
import org.xml.sax.InputSource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
DOMParser parser = new DOMParser();
String xmlFilePath = "path/to/xml/file.xml";
InputSource inputSource = new InputSource(xmlFilePath);
parser.parse(inputSource);
Document document = parser.getDocument();
Element rootElement = document.getDocumentElement();
for (int i = 0; i < rootElement.getChildNodes().getLength(); i++) {
Element childElement = (Element) rootElement.getChildNodes().item(i);
// ...
}