Forum Discussion

McMaster_Univer's avatar
15 years ago

XML DataSource not correctly escaping ampersands

I'm using an XML DataSource referencing the Response property of a SOAP Request. The raw XML of the Response has elements containing correctly escaped ampersands. When I configure the DataSource to use the content of those Response elements using XPath, the resulting requests I've configured in a DataSource Loop contain un-escaped ampersands. This generates a SOAP fault for the looped request, obviously.

Example initial response XML:
 
<courseSectionList>
<courseSectionIdType>
<subject>THTR&amp;FLM</subject>
</courseSectionIdType>
</courseSectionList>


DataSource Row XPath:

//courseSectionList/courseSectionIdType


DataSource Column XPath:

subject


Looped Request Body Definition:

<subject>${DataSource#subject}</subject>


Actual Request from HTTP log:

<subject>THTR&FLM</subject>

1 Reply

  • Hi!

    Have you tried selecting the "Entitize" option in the DataSource Options dialog?

    regards!

    /Ole
    eviware.com