xmlをちょめちょめ
サンプルxml
<?xml version="1.0" encoding="utf-8" ?> <data> <response_code>200</response_code> <cnt>0</cnt> <onetime_pw>9ByKA1IV61GZx0ootbcJ5ijSrCD1WA095QEjivbRQknSec4BGLLTY56J8eR0iLx5</onetime_pw> </data>
JavaScript
$(xml).find("response_code").each ( function () { alert( $(this).text() ); } ); $(xml).find("cnt").each ( function () { alert( $(this).text() ); } ); $(xml).find("onetime_pw").each ( function () { alert( $(this).text() ); } );