web stats
Output XML formatting - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 03-27-2008, 04:06 PM
skrugg skrugg is offline
Mirth Newb
Join Date: Sep 2006
Posts: 16
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?

Reply With Quote
Old 04-24-2008, 01:23 AM
drouhne drouhne is offline
Mirth Newb
Join Date: Apr 2008
Posts: 8
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.
Reply With Quote
Old 06-08-2010, 09:38 AM
jmurphy jmurphy is offline
What's HL7?
Join Date: Jun 2008
Posts: 3

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
Old 06-08-2010, 12:13 PM
albertosaez albertosaez is offline
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point

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
Old 06-08-2010, 10:54 PM
nicovn nicovn is offline
OBX.2 Kenobi
Join Date: Oct 2006
Location: Belgium
Posts: 61

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

Reply With Quote

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 03:15 PM
bad XML output *** is this a bug or is it just me? pomeroy8 Support 7 03-05-2009 05:06 AM
Formatting Email Sender - Mirth 1.7.1 wseay Support 2 01-21-2009 08:39 AM
Date Formatting - Mirth 1.7.1 wseay Support 2 05-02-2008 03:47 PM
Formatting Transcription Free-text shepherdcrane Support 3 04-19-2007 03:02 PM

All times are GMT -8. The time now is 01:55 AM.

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