Search code examples
xmlibm-watsonwatson-dialog

How to create a newline in Watson dialog xml?


If I have something like the following in watson dialog xml:

        <output id="output_2508575">
            <prompt selectionType="SEQUENTIAL">
                <item>Your options are: &#xa;
                      option1,&#xa;
                      option2,&#xa;
                      option3
                </item>
            </prompt>
        </output>

I get "Your options are: option1,option2,option3" without any newlines.

How do I create a newline? In addition to the above example I've also tried
\n
<br>
<br />
&lt;br /&gt;
&lt;br&gt;
&#xa;


Solution

  • You can use the following.

    <item>Your options are:&lt;br&gt;
      option 1,&lt;br&gt;
      option 2,&lt;br&gt;
      option 3&lt;br&gt;
    </item>