Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Converting from XML to string (http://www.mirthcorp.com/community/forums/showthread.php?t=10253)

krmurrell 03-21-2014 01:23 AM

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

krmurrell 03-21-2014 05:53 AM

Sorted - Sorry to bother anyone. XML Serializer is your friend!


All times are GMT -8. The time now is 07:06 PM.

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