Bookmark and Share Share

XML Escaping in URLs and Expressions

XPath expressions, URLs, SQL expressions or other values appear in EMML statements. All of these expressions can contain characters that are XML delimiters and thus can cause mashups to fail.

As a consequence, the following XML delimiter characters must be escaped in EMML:

Character XML Escape
& &
< &lt;
> &gt;
" &quot;
' &apos;

You only need to escape quotation characters (single or double) within attributes. For example:

<filter inputvariable="queryResult" 
  filterexpr="/customers[capitalization &gt; 125]" 
  outputvariable="midRange"/> 
 
<directinvoke 
  method="GET" 
  outputvariable="result" 
  endpoint="http://www.mySearch.com?q='java'&amp;v='2.1'" />