我的xml数据=<Item "/api/items/4000000002011"><ItemID>4000000002011</ItemID><Name>Sample Item1</Name><Description>Sample Description</Description><Rate>34.00</Rate><Tax1Name>PST</Tax1Name><Tax1Percentage>8</Tax1Percentage><Tax2Name/><Tax2Percentage/></Item>
HTML输出= <Item uri="/api/items/4000000002011"> <ItemID>4000000002011</ItemID><Name>Sample Item1</Name><Description>Sample Description</Description><Rate>34.00</Rate><Tax1Name>PST</Tax1Name><Tax1Percentage>8</Tax1Percentage><Tax2Name/><Tax2Percentage/></Item>
我想要html输出,我该怎么办?
<Item "/api/items/4000000002011">
<ItemID>4000000002011</ItemID>
<Name>Sample Item1</Name>
<Description>Sample Description</Description>
<Rate>34.00</Rate>
<Tax1Name>PST</Tax1Name>
<Tax1Percentage>8</Tax1Percentage>
<Tax2Name/>
<Tax2Percentage/>
</Item>
最佳答案
只需使用原样输出原始数据。渲染前请勿转义。