jQueryで一つ上の階層のHTMLを読み出せない2
[jQueryで一つ上の階層のHTMLを読み出せない]で悩んで解決したつもりだったけど解決していないので書き方を変える
http://papermashup.com/parse-xml-with-jquery/ <script type="text/javascript"> <!-- $(document).ready(function(){ $.ajax({ url: "ja/news/news.xml", dataType: "xml", success:xmlNewsTopics }); }); function xmlNewsTopics(xml){ $('#load').fadeOut(); var news="<dl>"; $(xml).find("Row").each(function(){ news+="<dt>"+$(this).find("opening").text()+"</dt>"; news+="<dd>"+$(this).find("texts").text()+"</dd>"; }); news+="</dl>"; $("#news_topics").prepend(news); } --> </script>
エクセルからはき出したXMLを取り込むことを念頭に置いている。やっぱりフルパスで書かないといけなくなりそう。