xpath 해결좀 해주세요 ㅠ
글쓴이: tc11 / 작성시간: 일, 2014/06/08 - 1:53오전
xml문서를 이런식으로 만들었고요
그중에 page만 출력하고 싶은데 잘 안되네요
chapter = (NodeList)xpath.evaluate("//contents/page", document, XPathConstants.NODESET);
for( int idx=0; idx
System.out.println(chapter.item(idx).getTextContent());
}
자바에서 이런식으로 작성했습니다. 그런데 page아래 자식노드들까지 모든내용이 출력되네요
그냥 1, 2 만 출력되게 도와주세요 ㅠ
File attachments:
첨부 | 파일 크기 |
---|---|
![]() | 17.32 KB |
Forums:
.
chapter.item(idx).getFirstChild().getNodeValue()
이렇게 해보시죠...
아 대박ㅠㅠ 감사해요 ㅠㅠ 이것땜에 하루종일
아 대박ㅠㅠ
감사해요 ㅠㅠ 이것땜에 하루종일 고생했는데 .....
댓글 달기