web stats
Output XML formatting - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2008, 05:06 PM
skrugg skrugg is offline
Mirth Newb
 
Join Date: Sep 2006
Posts: 16
skrugg
Default Output XML formatting

Hi Guys,

This is probably a dumb question, but I haven't been able to find the answer by searching.

I have an HL7 to XML (file writer) channel that creates segments dynamically based on the contents of the incoming message. The resulting XML is fine, except that the elements that aren't in the outbound message template don't have linebreaks after them.

Is there an easy way to ensure that every XML element is on its own line so that it is human readable in a regular text editor?

Thanks!
Reply With Quote
  #2  
Old 04-24-2008, 02:23 AM
drouhne drouhne is offline
Mirth Newb
 
Join Date: Apr 2008
Posts: 8
drouhne
Default Re:Output XML formatting

I have to do the same kind of work. Can you send me your channel? It will help me a lot.
Thanks in advance.
François.
Reply With Quote
  #3  
Old 06-08-2010, 10:38 AM
jmurphy jmurphy is offline
What's HL7?
 
Join Date: Jun 2008
Posts: 3
jmurphy
Default

is there a solution to this problem?

I am having the same issue.

for now I just view the xml inside mirth
Reply With Quote
  #4  
Old 06-08-2010, 01:13 PM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default

This is not a "problem", as the XML Mirth is generating is fine and well-formed, and should be processed by any program without problem.

You're talking about a visual issue: you need a pretty-print XML and mirth 1.8.2 doesn't have this option: you can use the 2.0, or use a XSLT processing step to pretty-print the XML.
Reply With Quote
  #5  
Old 06-08-2010, 11:54 PM
nicovn nicovn is offline
OBX.2 Kenobi
 
Join Date: Oct 2006
Location: Belgium
Posts: 51
nicovn
Default

Shouldn't be too hard to achieve in Mirth 1.8

Just add a javascript transformer step to your destination with this single line:

XML.prettyPrinting = true;
__________________
Nico Vannieuwenhuyze

Amaron.be
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Carriage return PDF and Text doc formatting konstantin Support 3 04-20-2013 04:15 PM
bad XML output *** is this a bug or is it just me? pomeroy8 Support 7 03-05-2009 06:06 AM
Formatting Email Sender - Mirth 1.7.1 wseay Support 2 01-21-2009 09:39 AM
Date Formatting - Mirth 1.7.1 wseay Support 2 05-02-2008 04:47 PM
Formatting Transcription Free-text shepherdcrane Support 3 04-19-2007 04:02 PM


All times are GMT -7. The time now is 04:33 PM.


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