いくつかのxmlを含むテキスト領域があります。このxmlを別の場所のdivにコピーしたいと思います。
例:xml
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
私は次のことを試みています:
$('#divId').text($('#area').val());
FirefoxとChromeで正常に動作します。IEは改行を失ったようです。
IEになります
<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>