Page 1 of 1

Handling special character in XML

Posted: Mon Nov 27, 2006 3:40 am
by sourabhverma
Hi all,

I am having a server job which is reading XML file using Folder & XML Input stage and finally i create sequential files.
Folder => XML Input => Tfm => Seq. file

the folder stage contains multiple XML files. My problem is that, sometimes the XML files have some special characters instead of actual attribute value.Then in that case the XML Input stage neglects reading that particular XML.
For eg. the NAME field contains NAME="[" value .

I want to know is there any way to handle these type of special characters while reading the file so that XML input stage either skip or manage that record.

Posted: Mon Nov 27, 2006 6:43 pm
by vmcburney
That's tricky. I wonder if those characters makes it badly formed XML. You could try preprocessing the file using XLS. Do a forum search on XLS for previous threads, I don't know a lot about it myself. You could also try stripping out these characters using an operating system script such as search and replace commands.

Posted: Tue Nov 28, 2006 4:34 am
by sourabhverma
Thanks WoMaWil for the reply & suggestion but the problem still persist because the routine you suggested will work before loading into target.
Actually the XML Input stage is not able to read the XML file having special character, so i think anything that could be done should be apply either at XML Input stage or at file level.