• 로그인 함 해보끄나?

  • Sarangnamu.net June 17, 2003
    Home Login Profile Study Open Project Q&A Google Code
    xml xmlpullparser XmlPullParser
    Last Modify : 13 January, 2011(12:54)
    public void loadXml() { try { String xmlPath = MR.string.miniple_root_directory; xmlPath += "/webauth.xml"; InputStream in = new FileInputStream(xmlPath); XmlPullParser parser = Xml.newPullParser(); parser.setInput(in, null); int eventType = parser.getEventType(); boolean done = false; while (eventType != XmlPullParser.END_DOCUMENT && !done){ String name = null; switch (eventType){ case XmlPullParser.START_DOCUMENT: break; case XmlPullParser.START_TAG: name = parser.getName(); if (name.equalsIgnoreCase("kt")) { _postURL = parser.getAttributeValue("", "url"); _did = parser.getAttributeValue("", "did"); _domain = parser.getAttributeValue("", "domain"); Log.v("@@XML@@", _postURL); Log.v("@@XML@@", _did); Log.v("@@XML@@", _domain); } else if (name.equalsIgnoreCase("successUrl")){ _successURL = parser.nextText(); Log.v("@@XML@@", _successURL); } else if (name.equalsIgnoreCase("failUrl")){ _failURL = parser.nextText(); Log.v("@@XML@@", _failURL); } break; case XmlPullParser.END_TAG: name = parser.getName(); if (name.equalsIgnoreCase("minigate")){ done = true; } break; } eventType = parser.next(); } Log.v("@@XML@@", "XML PULL PARSER END"); } catch (Exception e) { e.printStackTrace(); } }

    Comment


    입력하3 1503256898



    Locations of visitors to this page