Read the statement by Michael Teeuw here.
http request
-
@KirAsh4 I’ve isolated the issue as a Cross-Domain Access issue. Do you know of any particular way to make XMLHTTPRequests to external domains?
I wasn’t aware this would be an issue but apparently anybody who wants to use this and map to an external domain will have this issue unless they have a running PHP server that can store the XML results locally (or if they can access a server, they can add the line
Access-Control-Allow-Origin: *
to their HTML headers.Any ideas?
-
XMLHTTPRequest. Look at how the
'currentweather'
module does it in the'updateWeather()'
function. -
Yeah that’s what I based my original request functionality on. The OpenWeather API response is CORS compatible due to the response header - this is why the example response works well. Outside of this domain though (say on http://www.w3schools.com/xml/cd_catalog.xml (or any other external server). This unfortunately makes problems - I’m still looking for a work-around.
-
Welcome to Javascript security issues.
-
This post is deleted! -
This post is deleted! -
This post is deleted! -
I’m using that code in php
$xml = simplexml_load_file('XML/status1.xml'); echo "<br>--------------<br>XML parsing <br>--------------<br>"; $result = array(); foreach($xml->children() as $child){ $result[$child->getName()] = trim($child);
-
have a look in here https://forum.magicmirror.builders/topic/240/soccer-standings i had also problems with cors so i used the request module in my node_helper to fix it
-
I copied the xml file on a synology web server, same behaviour status :0