다음 XML을 구문 분석 할 수있는 방법을 누구에게도 알려줄 수 있습니까? 나는 HttpGet 메서드의 응답으로 다음 xml을 얻는다. 이 xml을 문자열 형식으로 저장할 수 있습니다.Android : XML 문자열에서 속성 값을 가져 오는 방법
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1">
<head>
<status>200</status>
</head>
<body>
<outline type="text" text="General" guide_id="f1" is_default="true"/>
<outline type="text" text="Rock Stations" guide_id="f2"/>
<outline type="text" text="Rock Stations" guide_id="f3"/>
<outline type="text" text="Rock" guide_id="f4"/>
<outline type="text" text="Awdhesh" guide_id="f5"/>
</body>
</opml>
나는 outline
의 속성을 구문 분석되고 싶어요. 또한 listview에 text
의 값을 표시하려고합니다. 샘플 코드를 제공해주십시오.
미리 감사드립니다 ... !!!
XML 파서를 사용하고 있습니까? – dirkgently
예,하지만 안드로이드에서 새로 생겨서 속성을 파싱 할 생각이 없지만 상태 값을 파싱 할 수 있습니다. –
[이 튜토리얼 참조] (http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/) – Praveenkumar