Loading
Salesforce から送信されるメールは、承認済ドメインからのみとなります続きを読む

Escape All the XML Special Characters in Dataweave

公開日: Jul 25, 2025
タスク

GOAL

This article will help in escaping all the special characters in XML.
Below is the list of all the escape characters that we have in XML:

"   "
'   '
<   &lt;
>   &gt;
&   &amp;
 
ステップ
Use the "escapeGT=true" header directive to achieve this goal.

Input payload
{
"Description": " < > & ' \""
}

Dataweave script
%dw 2.0
output application/xml escapeGT=true
---
payload

Output payload
<?xml version='1.0' encoding='UTF-8'?>
<Description> &lt; &gt; &amp; &apos; &quot;</Description>
 

 

ナレッジ記事番号

001116766

 
読み込み中
Salesforce Help | Article