Issue with templates in basic field editor via makeXMLDoc

It seems there is some issue with rendering of templates on fields editor developed dynamically using makeXMLDoc. Below is my xmlDefinition -

var xmlDefinition = $xml( ‘’
).append(
$xml(’’).append(
$xml(’’).append(
$xml(’’).append(
$xml(’’).append(
$xml(’’).append(
$xml(’’),
$xml(’’),
$xml(’’).append(
$xml(‘Client(s)’).append(
$xml(’’).append(
$xml(’’)
)
)
),
$xml(’’),
$xml(’’),
$xml(’’),
$xml(’’),
$xml(’’),
$xml(’’),
$xml(’’),
$xml(’’),
$xml(’’)
)
)
)
)
)
);

I basically need below code in the template field -

{{{Investor_s__c}}}

Any idea how can we implement the template in makeXMLDoc?

Here is the output of my code -

Any Luck?