0
안드로이드에서 xml의 내부 내용을 얻는 방법? 사전안드로이드에서 xml의 내부 내용을 얻는 방법?
예를 들어 내가 다음 코드를 사용하고 있지만, 실제 결과를 반환하지 않는경우 ..
String xml ="<hello><hai>welcome<hai></hello>";
InputStream is = new ByteArrayInputStream(xml.getBytes("UTF-8"));
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
Document document = documentBuilder.parse(is);
String response = document.getElementsByTagName("hello");
가 나는 결과를 필요로 "< 하이>에 오신 것을 환영합니다 < 하이>".. 감사합니다
예 : http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html – Lumis