Announcement

Collapse
No announcement yet.

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