I have a problem when converting a flat file to XML. When I found a control character in the flat file, I want to find the way to replace that special character with any other normal character, for example "*". I have tried using the function "escapeSubstitutions", but without any satisfactory result. I have also tried with the "findAndReplace" function, but nothing.
The problem is that when the conversion from flat to XMl is done, in the generated XML file I can find characters that make impossible to process that XML, because the character is not admitted.
What can I do to solve this problem?
Thank you very much
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I rewrite my messagge to see if anyone has find a solution to my problem. I would be very grateful if somebody could help me. I will rewrite all my execution so you an see everything on the mail list, because I think my first messagge didn't reach to you in the right format.
This is an example of a flat file I want to convert to XML(prueba):
As you can see, I have included in the example both functions I have used to resolve this problema: escapeSubstitutions and findAndReplace
This is the way i call the execution:
If for example, every time that comes a "t" in the flat file, I want to representate it on the XML file as an "a", what should I do?
Thank you very much again, I'm so sorry of being so insistent.
Last edit: aitor etxebarria gaztañaga 2013-06-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
Thank you very much
A little more information about my execution:
This is an example of a flat file I want to convert to XML(prueba):
This is my resources file (prueba.xml):
As you can see, I have included in the example both functions I have used to resolve this problema: escapeSubstitutions and findAndReplace
This is the way i call the execution:
And the resultant XML file is this(output.xml):
If for example, every time that comes a "t" in the flat file, I want to representate it on the XML file as an "a", what should I do?
Thank you very much
Last edit: aitor etxebarria gaztañaga 2013-06-12
Hi again to everone,
I rewrite my messagge to see if anyone has find a solution to my problem. I would be very grateful if somebody could help me. I will rewrite all my execution so you an see everything on the mail list, because I think my first messagge didn't reach to you in the right format.
This is an example of a flat file I want to convert to XML(prueba):
This is my resources file (prueba.xml):
As you can see, I have included in the example both functions I have used to resolve this problema: escapeSubstitutions and findAndReplace
This is the way i call the execution:
And the resultant XML file is this(output.xml):
If for example, every time that comes a "t" in the flat file, I want to representate it on the XML file as an "a", what should I do?
Thank you very much again, I'm so sorry of being so insistent.
Last edit: aitor etxebarria gaztañaga 2013-06-13