안녕하세요.
공공데이터포탈 (data.go.kr)에 있는 api를 파싱하면서 생긴 궁금증을 해소하고 싶습니다. 많은 검색을 하였지만, 제가 안목이 부족해서 만족할만한 답을 얻기가 힘들었습니다.
xml구조는 다음과 같습니다.
<?xml version="1.0" encoding="UTF-8"?>
<list>
<com.google.gson.internal.LinkedTreeMap resolves-to="linked-hash-map">
<entry>
<string>위도</string>
<string>37.3395566</string>
</entry>
<entry>
<string>병원명</string>
<string>강원동물병원</string>
</entry>
<entry>
<string>경도</string>
<string>127.9563269</string>
</entry>
<entry>
<string>소재지도로명주소</string>
<string>강원도 원주시 (개운동)</string>
</entry>
<entry>
<string>소재지우편번호</string>
<null />
</entry>
<entry>
<string>_id</string>
<double>2.0</double>
</entry>
<entry>
<string>연락처</string>
<string>033-123-7494</string>
</entry>
<entry>
<string>소재지지번주소</string>
<null />
</entry>
</com.google.gson.internal.LinkedTreeMap>
<com.google.gson.internal.LinkedTreeMap resolves-to="linked-hash-map">
<entry>
<string>위도</string>
<string>37.3341645</string>
</entry>
<entry>
<string>병원명</string>
<string>병원</string>
</entry>
<entry>
<string>경도</string>
<string>123.123</string>
</entry>
<entry>
<string>소재지도로명주소</string>
<string>강원도 원주시 (개운동)</string>
</entry>
<entry>
<string>소재지우편번호</string>
<null />
</entry>
<entry>
<string>_id</string>
<double>3.0</double>
</entry>
<entry>
<string>연락처</string>
<string>033-123-123</string>
</entry>
<entry>
<string>소재지지번주소</string>
<null />
</entry>
</com.google.gson.internal.LinkedTreeMap>
이런식으로 되어있습니다. 저는 xml파싱을 하려고 하는데 <com.google.gson.internal.LinkedTreeMap resolves-to="linked-hash-map"> 이 부분 때문에 기존의 방식대로 파싱이 잘 안되어서 문의드립니다.
여기서 기존의 방식이라고 하는 것은 "entry" 기준으로 xml.list()함수를 사용하여 하는 것입니다.
이런 경우에는 어떻게 파싱을 해야 하나요???