top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Informatica - replace characters in target [CLOSED]

+2 votes

I m working in a project which we create hundreds of xml's in informatica everyday, and all the data which is in the xml should be filtered, like removing all kind of special characters like * +.. You get the idea.

Adding regular expressions for every port is too complicated and not possible due the large amount of mapping we have.

I've added a custom property to the session XMLAnyTypeToString=Yes; and now i get some of the characters instead of &abcd, in their usual presentation (" + , ..).

I'm hoping for some custom property or change in XML target to remove these characters completely. any idea?

This question has an answer at: Informatica - replace characters in target
posted May 23, 2014 by Pooja Bhanout

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can make use of String.replaceAll method:

 String   replaceAll(String regex, String replacement) 
          Replaces each substring of this string that matches the given regular expression with the given replacement.

You can create a set of symbols you want to remove using regex, for example:


and then apply it to your string:

String myString = "this contains **symbols** like these $#%#$%";
String cleanedString = myString.replaceAll("[*+"#$%&]", "");

now you "cleanedString" is free of the symbols you've chosen.

answer May 26, 2014 by Shweta Singh
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.