Reputation: 1516
I am reading xml from a column in a database and passing it to the body of a web task in Data Factory.
Data factory is escaping any double quotes in the xml with a backslash, but this is causing the request to fail:
The message i read from the database:
<myXMLMsg xmlns="http:/vendor.com/integration/api">
<val1>sample value 1</val1>
<val2>sample value 2</val2>
</myXMLMsg>
What data factory sends, notice the double quotes escaped with backslash.
<myXMLMsg xmlns=\"http:/vendor.com/integration/api\">
<val1>sample value 1</val1>
<val2>sample value 2</val2>
</myXMLMsg>
Ive tried using the @replace function in data factory, converting the xml input to string, using the @xml function but so far nothing has worked.
Is there a way to pass xml to a web task in data factory, without data factory excaping the doublequotes?
Upvotes: 0
Views: 2689
Reputation: 5074
Escape character backslash \
appears wherever double quotes appear in the Azure data factory. It can be removed if you can convert your string to JSON type. But as your data is in XML type unfortunately it cannot be converted/replaced.
Another option is, you can replace double quote with another character Ex: @replace(your string,'"','''')
Upvotes: 1