I have this XML file:\[code\]<Credentials> <WebsiteApplication id="test"> <Username>ADMIN</Username> <Password>ADMIN</Password> </WebsiteApplication></Credentials><Credentials> <WebsiteApplication id="test2"> <Username>ADMIN2</Username> <Password>ADMIN2</Password> </WebsiteApplication></Credentials>\[/code\]And i want to Edit the Username (or the password) of a "WebsiteApplication" node only if its id is the same with the one a gave a input..i tried somethings that but it's not working...\[code\] System.out.println("Insert the id:...."); BufferedReader websiteIn = new BufferedReader(new InputStreamReader(System.in)); String Editid = websiteIn.readLine().toString(); Document doc = SecondaryFuncts.FindXML(); Element root = doc.getDocumentElement(); NodeList rootlist = root.getChildNodes(); for(int i=0; i<rootlist.getLength(); i++) {//THERE IS NO PROBLEM UNTILL NOW... //And now i trying to take the id and check if matches//with my input and them change nodes elements... Element Applications = (Element)rootlist.item(i); NamedNodeMap id = Applications.getAttributes(); for(int ids = 0 ; ids <id.getLength(); ids++) {I tried a lot in this loop but nothing worked.. what can i do here? Lets assume that i want username and password to change both as "test" }\[/code\]