| 
		
			Сообщение от am_sasa
			
		
	 | 
	| 
		не помогает
	 | 
	
function escapeHtml(text) {
  return text
      .replace(/&/g, "&")
      .replace(/</g, "<")
      .replace(/>/g, ">")
      .replace(/"/g, """)
      .replace(/'/g, "'");
}
let xml='<?xml version="1.0" encoding="windows-1251"?><root><item>Вася</item><item>Саша</item><item>Маруся</item></root>';
		const prn=window.open();
		if(!prn)
			throw new Error('Окно заблокировано');
		prn.document.write(escapeHtml(xml));
		prn.document.close();
		prn.focus();