Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to ignore XML Special/Reserved characters in XML Response

Options
Parasofttoudaya
Parasofttoudaya Posts: 232 ✭✭
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.

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,231 ✭✭✭
    edited August 2017
    Options

    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.