0
나는 다음 XML 파일을 분석해야하는데 person_type 값이 1 인 학생의 이름을 선택해야합니다. 내 java 프로젝트에서 dom4j를 사용하고 있으며 person_type의 값을 기반으로 firstname을 추출하는 솔루션을 찾을 수 없습니다. 어떤 도움을 주시면 감사하겠습니다.조건을 기반으로 Dom4j를 사용하여 xml 구문 분석
<?xml version="1.0"?>
<class>
<student>
<firstname>dinkar</firstname>
<lastname>kad</lastname>
<nickname>dinkar</nickname>
<marks>85</marks>
<person_types>
<person_type>1</person_type>
<person_description>POC</person_description>
</person_types>
</student>
<student>
<firstname>Vaneet</firstname>
<lastname>Gupta</lastname>
<nickname>vinni</nickname>
<marks>95</marks>
<person_types>
<person_type>1</person_type>
<person_description>Assistant</person_description>
</person_types>
</student>
<student>
<firstname>jasvir</firstname>
<lastname>singn</lastname>
<nickname>jazz</nickname>
<marks>90</marks>
<person_types>
<person_type>1</person_type>`
<person_description>Leader</person_description>
</person_types>
</student>
</class>
는 구글. 그에게 엄청난 해결책이 있습니다 – efekctive
고맙습니다 ... 할 것입니다 –