Given a csv file and using a transform to convert from csv to xml, I'm having difficulty stripping quotes from the new xml output. during the mapping, I have tried to use @TRIM(XML_ELEMENT,'"') which actually works for any elements which have text. For any elements which are empty or ("") the function seems to return a single quote ("). Very frustrating.
example csv FIRST, LAST, MID "BOB","MOORE",""
The @TRIM function for each xml converted element now looks like this (BOB, MOORE,")
Can anyone help me understand what I'm doing wrong?? Should I use another function? BTW the @TRIM(xml_element,'"',true) used for trimming ALL chars does not appear to work either. When I try this, nothing happens and ALL my quotes come through.This message has been edited. Last edited by: Phil DeBusk,
WebFOCUS 7.6 Windows, All Outputs
June 06, 2013, 01:32 PM
Tom Flynn
Don't know if this is available in IWAY/Data Migrator, but, have you tried STRREP?
I've consulted with several people in the iWay group, and @TRIM is the right function to use.
Can you please try “@TRIM(xml_element,",true)” (remove the single quotes from the double quote to be stripped in the second argument)?
If this doesn’t work, please open a case on InfoResponse Online so we can examine your project.
Regards,
Kathryn
June 11, 2013, 02:49 PM
Phil DeBusk
Thanks Kathryn, As it turns out the crux of my problem was in the transform configuration. I needed to set the "Text Qualifier" in the input to parse for double-quotes. This stripped all the messy quotes from my document and allowed all my functions to work as advertised.