Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Need HTML charater code for bold & Italic

Avatar

Former Community Member

I have a text field with xml data coming in. xml file example:

<?xml version ="1.0" encoding="UTF-8"?>


<Address>

     <Name>

          <FirstName>Test field</FirstName>

          <Input> You are going to the park</Input>

     </Name>

</Address>

So lets say i have a sentence coming in as "Your are going to the park" now I do not want everything in the field to be italic or bold just the word "park" to be bold & in italics. How do I do this within the xml. I have used HTML charater codes such as "&#xA;" for line break "&#x9;" for tabing but using <b> or <i> does not work I need the HTML character codes for italic and bold. Please help

1 Reply

Avatar

Level 8

Rich Text is expressed in XFA via the use of [XHTML] markup augmented with a restricted set of Cascading

Style Sheet attributes [CSS2] (XFA Specification).

The field needs to be set to accept rich text. The text in the xml then needs to be in a <body> element:

 

<

body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="text-decoration:none;letter-spacing:0in">You are going to the <span style="font-weight:bold;font-style:italic">park</span>.</p></body

>


The xhtml namespace has to be there.

Kyle