我使用以下模板构建一些XML:
xml nw config = renderHtml [shamlet|
<nw version="#{version config}" nr="#{nw}">
<compatibleHardwares>
$forall hw <- hws
<compatibleHardware>
#{hw}
|]
where
hws = (compatiblehardware config)
输出结果为:
<nw version="1.0" nr="NW011"><compatibleHardwares><compatibleHardware>X4578</compatibleHardware>
</compatibleHardwares>
</nw>
是否可以打印出由hamlet创建的输出?