1 2 3 4 5 6$(function() { 7 8 9 rss_init(); 10}); 11 12 13 14 15var rss_init = function() { 16 17 $.ajax({ 18 url: '/dev/rss.php', 19 xmlType: 'xml', 20 success: function(xml) { 21 var row = 0; 22 var data = []; 23 var nodeName; 24 var output = $('#rss'); 25 26 $(xml).find('item').each(function() { 27 data[row] = {}; 28 $(this).children().each(function() { 29 nodeName = $(this)[0].nodeName; 30 data[row][nodeName] = {}; 31 attributes = $(this)[0].attributes; 32 for (var i in attributes) { 33 data[row][nodeName][attributes[i].name] = attributes[i].value; 34 } 35 data[row][nodeName]['text'] = $(this).text(); 36 }); 37 row++; 38 }); 39 40 output.wrapInner('<ul></ul>'); 41 for (i in data) { 42 var date = new Date(data[i].pubDate.text); 43 var strdate = date.getFullYear() + 'å¹´' + (date.getMonth() + 1) + 'æ' + date.getDate() + 'æ¥'; 44 if(i < 4){ 45 output.find('ul').append('<li><span class="tag">' + data[i].category.text + '</span>ã<a href="' + data[i].link.text + '" target="_blank">' + data[i].title.text + '</a>' + '</li>'); 46 //console.log (data[i]); 47} 48 } 49 } 50 }); 51 52 53 54//}); 55 56 57} 58 59
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.