将js中的字符串保留原格式显示在新标签页

js中得到如下xml格式的字符串

“<configuration>

<startup>

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>

</startup>

</configuration>”

如何直接在js中操作使其显示在新标签页中,像这样

<xmp>
	<h1>h1标签</h1>
	<b>B标签</b>
</xmp>

将你的代码标签外边包上xmp标签

使用textarea