gpt4 book ai didi

xml - 如何在 soap UI 中转义符号 (&)

转载 作者:数据小太阳 更新时间:2023-10-29 01:44:34 24 4
gpt4 key购买 nike

我正在使用 soap UI(来自 smartbear)以 xml 格式发送 soap 请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsg="http://wsg.hpos.om.hp.com/">
<soapenv:Header/>
<soapenv:Body>
<wsg:abc>
<wsg:contract>
&lt;request&gt;

&lt;request-attributes&gt;
&lt;message&gt;"this &amp; and that"&lt;/message&gt;
&lt;/request-attributes&gt;
&lt;/request&gt;
</wsg:contract>
</wsg:abc>
</soapenv:Body>
</soapenv:Envelope>

响应是:无效请求。您能否阐明如何逃脱 &?谢谢

最佳答案

您可以将负载包装在 <![CDATA[]]> 中不用担心转义:

<![CDATA[<request>
<request-attributes>
<message>"this & and that"</message>
</request-attributes>
</request>]]>

关于xml - 如何在 soap UI 中转义符号 (&),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18957661/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com