我有这个字符串
<PARAMETERS zone = "6" check_in = "2012-07-01" check_out = "2012-07-02">
<ROOMS>
<ROOM adults = "2" children = "0"/>
</ROOMS>
</PARAMETERS>
我想在 vb.net 中获得这个其他的
<PARAMETERS zone = "6" check_in = "2012-07-01" check_out = "2012-07-02">
<ROOMS>
<ROOM adults = "2" children = "0"/>
</ROOMS>
</PARAMETERS>
有人知道是否存在直接执行此操作的函数吗?
谢谢。
最佳答案
来自 MSDN:
Converts a string into an HTML-encoded string.
一个重载可以这样使用:
var html = HttpUtility.HtmlEncode(myStringToEncode);
关于vb.net - 在 vb.net 中将 < 和 > 转换为 < 和 >,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11273019/