How to ignore XML Special/Reserved characters in XML Response

ParasofttoudayaParasofttoudaya Posts: 208 ✭✭
edited August 2017 in SOAtest

Lets take an example where xml response is retrieved from a table. When data is retrieved from table, it used to be adding xml reserved characters.

usually it will have < as "<" and > as "&gt". You cant perform assertion or extracting the value is difficult.

We have to use "Transform XML" to the node where we get the data with reserved characters.

on top of that you can use "XMLDataBank" or "XMLAssertor" to find an element.


  • benken_parasoftbenken_parasoft Posts: 590 ✭✭✭
    edited August 2017

    If your XML document has another XML document encoded in it, then you must use and XML Transformer (or Data Bank) to extract the text node containing the encoded XML document. When extracting text nodes, any XML escape sequences (entity refs) in the text node are automatically decoded. With the embedded XML document decoded, you can now perform assertions and run XPaths on it. It is not possible to run XPaths, for example, directly on encoded XML. You have to decode it first as described.

Sign In or Register to comment.