자바 xml attribute parse

조회 2,161 · 댓글 0
¯¯\_(ツ)_/¯작성자2018년 4월 17일


for (int i = 0; i < length; i++) {
Node currentNode = nodeList.item(i);
if (currentNode.hasAttributes()) {
Attr attr = (Attr) node.getAttributes().getNamedItem("[이름...]");
if (attr != null) {
String attribute = attr.getValue();
}
}
}

로그인 후 답글을 남길 수 있습니다.