Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Output XML formatting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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.

    Comment


    • #3
      is there a solution to this problem?

      I am having the same issue.

      for now I just view the xml inside mirth

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment

          Working...
          X