Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doc.getDocumentElement().normalize();
- String nodeValue = null;
- String strAttribute = null;
- NodeList nodes = doc.getElementsByTagName("Strings");
- for (int i = 0; i < nodes.getLength(); i++) {
- Node ndremidertype = nodes.item(i);
- Element elUser = (Element) nodes.item(i);
- NodeList nlusers = elUser.getElementsByTagName("String");
- for (int j = 0; j < nlusers.getLength(); j++) {
- Node nduser = nlusers.item(j);
- strAttribute = nduser.getAttributes()
- .getNamedItem("_locID").getNodeValue();
- Element elusername = (Element) nlusers.item(j);
- nodeValue = elusername.getNodeValue();
- elusername.getNodeName();
- System.out.println("Attribute Value = " + strAttribute);
- System.out.println("Node Value = " + nodeValue);
Add Comment
Please, Sign In to add comment