Changeset 3329
- Timestamp:
- 08/08/13 12:34:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/test/mockjax/mockjax-xml.js
r3324 r3329 31 31 // success: function(xml) { 32 32 // can be used if parameters textStatus and jqXHR are not required within the following code block 33 console.log('Data: ' + $(xml)); 34 console.log($(xml)); 33 34 $xml = $(xml); 35 36 console.log('Data: ' + $xml); 37 console.log($xml); 35 38 console.log('Status: ' + textStatus); 36 39 console.log('XMLHttpRequest object: ' + jqXHR); 37 40 console.log(jqXHR); 38 39 var headline = ""; 40 $(xml).find('annotation').each(function() { 41 headline += '<br />' + $(this).find('headline').text(); 41 42 var aidArr = []; 43 var aid_string = ""; 44 $xml.find('annotations annotation').each(function() { 45 aidArr.push($(this).attr('ref').substr(29)); // http://dasish.eu/annotations/ is erased 42 46 }); 43 $('#xmlContents').html('<h4 style="margin-bottom: 0;">Headline:</h4>' + headline); 47 48 console.log(aidArr); 49 50 for(var i in aidArr) { 51 aid_string += '<br />' + aidArr[i]; 52 $('#xmlContents').html('<h4 style="margin-bottom: 0;">List of AIDs returned from REST service address<br />GET api/annotations?link="URI":</h4>' + aid_string); 53 } 54 44 55 } 45 56 });
Note: See TracChangeset
for help on using the changeset viewer.