wso2 - 如何获取 XML 有效负载属性
问题描述
我有一个有效载荷如下。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<response xmlns="http://edip-api.macausjm-glp.com/apiservice">
<recipientAddress>zoehuang@asqimacau.com,well168168@gmail.com</recipientAddress>
<subject>Test email</subject>
<content>
<html>
<h1>this is the title</h1>
<br />
<p>this is the content................</p>
</html>
</content>
</response>
</soapenv:Body>
</soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
我需要获取如下内容值,如何获取属性?
<html>
<h1>this is the title</h1>
<br />
<p>this is the content................</p>
</html>
解决方案
要将 XML 树存储在属性中,请使用 type='OM'
所以<property name="testAmanda" expression="//html" type="OM" />
推荐阅读
- java - REST API 请求
- wordpress - 在 Wordpress 中使用带有可见 API 密钥的 WP Super Cache 的单个 Cloudflare 帐户
- logging - ZeroMQ (0MQ) 服务器将客户端发送消息的状态信息保存多长时间?
- bash - 测试是否存在某种类型的文件
- python - 具有 3 个月数据集的多元时间序列预测
- php - PHP:如何从关联数组中删除行
- html - 为什么我没有使用 p-calendar [PrimeNG] 获得正确的样式
- java - Spring中带有抽象类的构造函数依赖注入
- c++ - 如何理解 C++ 函数块内部定义的静态变量?
- c# - 在c#中使用while循环时出现问题