How to use XML locally and avoid CORS issues.


  1. Download and install Python 3. Make sure to select the 'Add Python to PATH' option
  2. Open Command Prompt (Start->Run->CMD)
  3. Change directory to the folder containing your index.html file using the syntax: cd C:\Path\To\Directory\
  4. run the command: python -m http.server
  5. Install the CORS web extension for your browser:
  6. Open a new tab in your web browser, go to localhost:8000
  7. Disable CORS using the extension (click on the extension, toggle CORS off)
  8. Refresh the webpage

Your webpage should now display with XML correctly.

Link to instructions: https://www.technobush.com/set-up-local-web-server-in-python/



Last modified: Wednesday, 7 April 2021, 4:45 PM