XML Format

Certified Lead Developer
Hi,

How to convert a CDT to an XML format excluding XML Header information.
To achieve this requirement I used toxml() function but it is including XML Header as shown below.

<n1:EmployeeDetails xmlns:n1="EmployeeDetails">
<firstName>xyz</firstName>
<lastName>abc</lastName>
</n1:EmployeeDetails>

But I want result as shown below.

<firstName>xyz</firstName>
<lastName>abc</lastName>

OriginalPostID-259969

  Discussion posts and replies are publicly visible

Parents
  • How about using toxml() function and then manipulating its output by text functions. You can strip out the <n1:EmployeeDetails> from the output. You could try it with different text functions(cleanwith() and stripwith() come to mind) or use regex functions. There is one regex plugin in Shared components which allows replacing a pattern in a text.
Reply
  • How about using toxml() function and then manipulating its output by text functions. You can strip out the <n1:EmployeeDetails> from the output. You could try it with different text functions(cleanwith() and stripwith() come to mind) or use regex functions. There is one regex plugin in Shared components which allows replacing a pattern in a text.
Children
No Data