web stats
help with response - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 02-21-2020, 06:59 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,176
agermano is on a distinguished road
Default

One last option, if what you used as framing characters ('<?xml' and '</XML>') will always work for you for splitting messages (you always start with the xml declaration, your root node is always named XML, and it will never have any descendant elements with the same name.) You can just add those strings back to the beginning and end of the message in the pre-processor, so you will have a complete message by the time your transformer starts.
Reply With Quote
  #12  
Old 02-21-2020, 07:03 AM
lunknowl lunknowl is offline
Mirth Newb
 
Join Date: Feb 2020
Posts: 11
lunknowl is on a distinguished road
Default

Quote:
Originally Posted by agermano View Post
One last option, if what you used as framing characters ('<?xml' and '</XML>') will always work for you for splitting messages (you always start with the xml declaration, your root node is always named XML, and it will never have any descendant elements with the same name.) You can just add those strings back to the beginning and end of the message in the pre-processor, so you will have a complete message by the time your transformer starts.
that is what im thinking, do you have the script to add <?xml to begining and </XML> to the end in pre-processor, thanks, i try to search arround and i try to write my own code but it will be helpful if you already know the code, i dont want to be a lazy butt but if someone already have the code or sample it will be helpful


message = message.replace(/'</XML>'/g,'</XML><CR><LF>');

Last edited by lunknowl; 02-21-2020 at 07:18 AM.
Reply With Quote
  #13  
Old 02-21-2020, 07:46 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,176
agermano is on a distinguished road
Default

You just need to concatenate the strings together.

Code:
return '<?xml' + message + '</XML>';
Reply With Quote
  #14  
Old 02-21-2020, 10:42 AM
lunknowl lunknowl is offline
Mirth Newb
 
Join Date: Feb 2020
Posts: 11
lunknowl is on a distinguished road
Default

Quote:
Originally Posted by agermano View Post
You just need to concatenate the strings together.

Code:
return '<?xml' + message + '</XML>';
thanks that work!
Reply With Quote
Reply

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 08:45 AM.


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