Parsing attribute in XML with DOM parser
问题 I am currently parsing XML, but im not quite sure how to parse the "status" attribute of "message": <message status="test"> <text>sometext</text> <msisdn>stuff</msisdn> </message> Here is the code, i have cut off everything unnecessary: NodeList nodeLst = doc.getElementsByTagName("message"); for (int s = 0; s < nodeLst.getLength(); s++) { Node fstNode = nodeLst.item(s); if (fstNode.getNodeType() == Node.ELEMENT_NODE) { Element fstElmnt = (Element) fstNode; NodeList numberNmElmntLst = fstElmnt