tesmc
asked on
XJS: How to remove special characters in email in xml string
I'm making a call to a web service where it returns the email with special characters ‡
It does not always return ‡, sometimes it's others and I won't know.
I have the following xml string where I want to clean up the email
var strResponse = '<Body><PaxRS><ItineraryRe f ID="XBHGGE"/><TravelRS><Tr avel><Cust omerInfo>< PersonName ><Email>‡ JOHNDOE@AO L.COM‡1.1 </Email></ PersonName ></Custome rInfo></Tr avel></Tra velRS></Pa xRS></Body >';
I want to be able to clean up the email of any special characters that exist, how can I do this in xjs if i don't know the exact special characters that the web service would be returning?
I tried doing this with xslt and though it would strip out the special characters, within the actual platform I'm using it would not remove it, so I want to remove it via javascript instead.
Please advise.
It does not always return ‡, sometimes it's others and I won't know.
I have the following xml string where I want to clean up the email
var strResponse = '<Body><PaxRS><ItineraryRe
I want to be able to clean up the email of any special characters that exist, how can I do this in xjs if i don't know the exact special characters that the web service would be returning?
I tried doing this with xslt and though it would strip out the special characters, within the actual platform I'm using it would not remove it, so I want to remove it via javascript instead.
Please advise.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER