如何获取XML有效负载属性

时间:2019-02-11 04:37:48

标签: wso2 ei

我有一个有效载荷,如下所示。

<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>

1 个答案:

答案 0 :(得分:0)

要在属性中存储XML树,请使用type ='OM'

所以<property name="testAmanda" expression="//html" type="OM" />