web stats
Converting from XML to string - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2014, 01:23 AM
krmurrell krmurrell is offline
OBX.2 Kenobi
 
Join Date: Mar 2013
Location: London, UK
Posts: 61
krmurrell is on a distinguished road
Default Converting from XML to string

Grateful for advice
I am saving a PV1 segment from one message to later use in a second message - saving the segment off to the data base works, and getting it back later.

The string is similar to...
PV1|<PV1><PV1.1><PV1.1.1>1</PV1.1.1></PV1.1><PV1.2/><PV1.3><PV1.3.1>AN.MIDWIFE</PV1.3.1><PV1.3.2>Midwife Anc Mon-Fri</PV1.3.2></PV1.3><PV1.4/><PV1.5/><PV1.6/><PV1.7><PV1.7.1>M0000</PV1.7.1><PV1.7.2>MIDWIFE</PV1.7.2><PV1.7.3/></PV1.7><PV1.8><PV1.8.1>CALLJM</PV1 etc etc

I add it to the outgoing message with
msg['PV1'] = strMessage;

But this sends the XML rather than the string
How do I un-xml it??

Regards and thanks

Kevin
Reply With Quote
  #2  
Old 03-21-2014, 05:53 AM
krmurrell krmurrell is offline
OBX.2 Kenobi
 
Join Date: Mar 2013
Location: London, UK
Posts: 61
krmurrell is on a distinguished road
Default

Sorted - Sorry to bother anyone. XML Serializer is your friend!
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 06:45 PM.


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