I would like to open a new window after a click event and show an xml structure. I do not want that browser interpret my xml.
I tried with this:
window.open('data:text/xml;charset=utf-8,<?xml version="1.0" encoding="UTF-8"?><RootTag>'+xml+'</RootTag>', "", "_blank")
with chrome this do not work.
I solved this problem with this code in the component.ts
let blob = new Blob([text], {type: 'text/xml'});
let url = URL.createObjectURL(blob);
window.open(url);
URL.revokeObjectURL(url);
This open a new window with the view just for xml.