Guest User

Untitled

a guest
Jun 18th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. doc.getDocumentElement().normalize();
  2. String nodeValue = null;
  3. String strAttribute = null;
  4. NodeList nodes = doc.getElementsByTagName("Strings");
  5.  
  6. for (int i = 0; i < nodes.getLength(); i++) {
  7. Node ndremidertype = nodes.item(i);
  8.  
  9. Element elUser = (Element) nodes.item(i);
  10. NodeList nlusers = elUser.getElementsByTagName("String");
  11. for (int j = 0; j < nlusers.getLength(); j++) {
  12. Node nduser = nlusers.item(j);
  13. strAttribute = nduser.getAttributes()
  14. .getNamedItem("_locID").getNodeValue();
  15. Element elusername = (Element) nlusers.item(j);
  16. nodeValue = elusername.getNodeValue();
  17. elusername.getNodeName();
  18. System.out.println("Attribute Value = " + strAttribute);
  19. System.out.println("Node Value = " + nodeValue);
Add Comment
Please, Sign In to add comment