import org.apache.xerces.parsers.DOMParser; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class DomMain { public static void main(String arg[]) { try { DOMParser parser=new DOMParser(); parser.setIncludeIgnorableWhitespace(true); parser.setFeature("http://xml.org/sax/features/validation",true); parser.parse("document.xml"); Document doc=parser.getDocument(); //findWithGetElementByTagName(doc); findWithByBrowsing(doc); } catch (Exception e) { // TODO: handle exception } } public static void findWithGetElementByTagName(Document doc) { NodeList nl=doc.getElementsByTagName("acteur"); Node n; NodeList nl2; for (int i=0;i