I want to extract crop curve data from here:
http://www.treasury.gov/resource-center/data-chart-center/interest-rates/pages/XmlView.aspx?data=yieldyear&year=2015
Below, the request for return returns a status code of 200 (OK), but also a console note indicating that the request for cross-request is blocked because the CORS header 'Access-Control-Allow-Origin' is missing.
$.get('http://www.treasury.gov/resource-center/data-chart-center/interest-rates/pages/XmlView.aspx?data=yieldyear&year=2015', function (data) { $(data).find("entry").each(function () { // or "item" or whatever suits your feed var el = $(this); console.log("------------------------"); console.log("d:NEW_DATE : " + el.find("d:NEW_DATE").text()); console.log("d:BC_1MONTH : " + el.find("d:BC_1MONTH").text()); console.log("d:BC_3MONTH : " + el.find("d:BC_3MONTH").text()); });
});
Are there clear rules / laws on data access if Access-Control-Allow-Origin is not set to '*' (public)?
? ; Access-Control-Allow-Origin ? (Access-Control-Allow-Origin Multiple Origin Domains?).
, CORS (https://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/). / ? , - , , ?
, ?
PHP, XML , javascript , "Access-Control-Allow-Origin". :
$url = "http://www.treasury.gov/resource-center/data-chart-center/interest-rates/pages/XmlView.aspx?data=yieldyear&year=2015"; $xml = simplexml_load_file($url); echo $xml->asXML();
; , , data.gov. .
CKAN API, , CKAN, .
Source: https://habr.com/ru/post/1615100/More articles:How to use a dictionary key, a pair of values to set the attributes of an instance of the pythonic class? - pythonbash command to open one command or another command - linuxBest XML format for event logging in terms of data mining and visualization tool support? - javaНе удается получить идентификатор элемента списка с помощью jQuery - htmlCan migrations be used with bookshelf.js? - javascriptNameError: uninitialized constant Mail :: Parsers :: ContentTransferEncodingParser - ruby | fooobar.comGoogle OAuth 2.0. The javascript API does not remain “logged in” after page refresh - angularjsConnecting to a MySQL database through dplyr using stored credentials - rNo parallel tests with xUnit DNX - jsonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1615105/why-does-react-require-so-many-nodemodules-how-can-i-limit-loading-all-those-files-to-make-it-worth-using-react&usg=ALkJrhjrPO0BnQefZnXBrYA02oAsl-pxjwAll Articles