To get a XML file in JavaScript can be difficult due to the same origin policy. CORS is on solution but using JSONP is a much simpler solution also because JavaScript kind of like the JSON format.
The problem here for VSCP is that the MDF (Module Description File) is in XML format. We therefore need a conversion.
This PHP scripts will handle this and out put a local xml file in JSON/JSONP format
You can test the output for the Paris module
here.
In this case the local MDF file is paris_010.xml and we request JSONP output using the function “callback”.
If we skip the
&jsonp=callback
we get pure JSON output instead.
The script can be downloaded here.