Convert HL7 messages to/from XML

Added by iNTERFACEWARE

How to convert an HL7 message to and from an XML representation, using chm.toXml{} and chm.fromXml{}

Source Code
-- convert an HL7 message to XML representation
local xml = chm.toXml{vmd='example/demo.vmd', data=Data}

-- convert XML to an HL7 message
local Data = chm.fromXml{vmd='example/demo.vmd', data=xml}

-- convert an HL7 node tree to XML
local Msg = hl7.parse{vmd='example/demo.vmd', data=Data}
local xml = chm.toXml{vmd='example/demo.vmd', data=Msg:S()}
Description
How to convert an HL7 message to and from an XML representation, using chm.toXml{} and chm.fromXml{}