0
我想打印出HTML頁上的XML文件。 我使用引入nokogiri有:用Nokogiri打印XML(在Padrino中),並具有良好的縮進
Nokogiri::XML::DocumentFragment.parse("<note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>").to_xml(:indent => 2)
,但我的HTML頁面上我得到了:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
代替
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
我打印出來與padrino逃生功能(html_escape) 。
這似乎是該功能產生的問題,因爲在控制檯中一切都正確打印。
你能幫我解決這個問題嗎?我試圖找到一些答案,但我沒有找到任何東西。