on 01-25-2017 8:18 AM
Hi Experts,
I have the following XML
<root>
<element>
<url>https://www.google.com</url>
<status>NOTOK</status>
</element>
<element>
<url>https://www.facebook.com</url>
<status>OK</status>
</element>
</root>
And I would like to use the following XPath Expression (/root/element[status/text() = 'OK']/url) in the General Splitter
However, I'm getting an error about the limitation of the XPath Expression.
I also tried using Header and Property from Content Modifier but I'm still getting the same problem.
Is there any workaround for this aside from the split in Message Mapping?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mark,
I have also tried it its not removing element below are the details ( Could you please check your filter condition )
Input XML:
<root>
<element>
<url>https://test.com</url>
<status>OK</status>
</element>
<element>
<url>https://mail.test.com</url>
<status>NOTOK</status>
</element>
<element>
<url>https://tester.com</url>
<status>OK</status>
</element>
<element>
<url>https://eree.tr.com</url>
<status>NOTOK</status>
</element>
</root>
Filter Condition:
/root/element[status/text()='OK']
Content Modifier:
<root>
${in.body}
</root>
Output:
<root>
<element>
<url>https://test.com</url>
<status>OK</status>
</element>
<element>
<url>https://tester.com</url>
<status>OK</status>
</element>
</root>
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mark,
Rebuilding is very simple after Filter add Content Modifier something like below in Body since Filter removes only <root> element.
<root>
${in.body}
</root>
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.