Skip to main content
  • New archived content: Talend MDM, Talend Data Catalog 8.0, and Talend 7.3 products reached their end of life in 2024. Their documentation was moved to the Talend Archive page and will no longer receive content updates.
Close announcements banner

Formatting an XML string

It is easy to run the replaceSpecialCharForXML routine along with a tJava component, to format a string for XML:

System.out.println(TalendString.replaceSpecialCharForXML("Thelma & Louise"));

In this example, the & character is replaced in order to make the string XML compatible:

The result is "Thelma & Louise" in the Run view.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!