Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] How to strip quotes from XML
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] How to strip quotes from XML
 Login/Join
 
Member
posted
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
 
Posts: 14 | Registered: November 08, 2011Reply With QuoteReport This Post
Expert
posted Hide Post
Don't know if this is available in IWAY/Data Migrator, but, have you tried STRREP?


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1947 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
<Kathryn Henning>
posted
Hi Phil,

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
 
Reply With QuoteReport This Post
Member
posted Hide Post
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.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 14 | Registered: November 08, 2011Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] How to strip quotes from XML

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.