Created
June 11, 2011 09:12
-
-
Save tokkonopapa/1020398 to your computer and use it in GitHub Desktop.
/echo/xml/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dl#xml { | |
border:1px solid #999; | |
width:240px; | |
} | |
dt.name { | |
float:left; | |
width:100px; | |
padding:5px 0 5px 10px; | |
clear:both; | |
font-weight:bold; | |
} | |
dd.maker { | |
width:120px; | |
margin-left:100px; | |
padding:5px 5px 5px 10px; | |
border-left:1px solid #999; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dl id="xml"></dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
// jQuery.post() | |
$.post("/echo/xml/", { | |
xml:"<車><乗用車><車名>プリウスα</車名><メーカー>トヨタ</メーカー></乗用車>" + | |
"<乗用車><車名>CR-Z</車名><メーカー>ホンダ</メーカー></乗用車></車>", | |
deley: 0 | |
}).success(function(data, textStatus, jqXHR) { | |
console.log("jQuery.post()", textStatus, data); | |
$(data).find("乗用車").each(function() { | |
var name = $(this).find("車名").text(); | |
var maker = $(this).find("メーカー").text(); | |
$("#xml").append("<dt class='name'>" + name + "</dt><dd class='maker'>" + maker + "</dd>"); | |
}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: /echo/xml/ | |
description: /echo/xml/ のテスト | |
authors: | |
- tokkonopapa | |
resources: | |
- https://getfirebug.com/firebug-lite-debug.js | |
normalize_css: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment