web stats
XML Source - Removing Characters? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2015, 01:11 PM
Rubicon Rubicon is offline
OBX.2 Kenobi
 
Join Date: Feb 2013
Posts: 98
Rubicon is on a distinguished road
Default XML Source - Removing Characters?

Hi All,
How would one remove certain characters from XML to Text file?

I need to remove the characters of <, >, / and from Source to Destination.

I've tried this in both Preprocessor and the Destination Transformer using:

var outputText = inputText.replace( /<|>|\/|"/g, "" );

However, I do not know if replace is a method XML, anyway it does not work.

Any ideas out there?

Thank you,

Rubi
Reply With Quote
  #2  
Old 12-04-2015, 01:19 PM
satheeskumar satheeskumar is offline
OBX.1 Kenobi
 
Join Date: Aug 2015
Location: UK
Posts: 46
satheeskumar is on a distinguished road
Default

one possible way is to use the traditional approach like parsing the xml and construct the output as whatever the way you want ?
Reply With Quote
  #3  
Old 12-04-2015, 01:23 PM
Rubicon Rubicon is offline
OBX.2 Kenobi
 
Join Date: Feb 2013
Posts: 98
Rubicon is on a distinguished road
Default

Quote:
Originally Posted by satheeskumar View Post
one possible way is to use the traditional approach like parsing the xml and construct the output as whatever the way you want ?
I'm really not sure on how to do that. Can you explain more in detail? it's XML.. I'm not to savvy with XML.
Reply With Quote
  #4  
Old 12-07-2015, 03:55 AM
satheeskumar satheeskumar is offline
OBX.1 Kenobi
 
Join Date: Aug 2015
Location: UK
Posts: 46
satheeskumar is on a distinguished road
Default

hi,

I am also not expert with JavaScript, but there are examples in available to parse using DOM with javascript.

write a javascript function which does your job in Globel code template and use it.
Reply With Quote
Reply

Tags
preprocessor, remove text, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:01 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation