web stats
String to XML - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2019, 09:38 AM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,228
cory_cole is on a distinguished road
Default String to XML

In OBX.5 we have an encoded message. I have decoded the data and pieced it together, which is an XML. Now I have to parse through the XML to the data out. How do I convert that string into an XML so that I can read the tags?
Reply With Quote
  #2  
Old 06-18-2019, 10:50 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 806
agermano is on a distinguished road
Default

Code:
var xmlString = "<xml><a>1</a><b>2</b></xml>";
var xml = new XML(xmlString);
logger.info(xml.a.toString());
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 07:29 PM.


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