It all depends what kind of XML document you need. There are two basic
approaches:
1) Import an XSD to generate a tree of classes using the XML Schema wizard,
then use DTL to construct an instance of the desired class from the input
HL7 document. This is a good approach if you have an XSD and the schema it
represents is not too complex, and there are not too many kinds of HL7 input
documents you will be exporting.
2) write a method to generate XML directly from the input HL7 document,
simiilar to the way we generate HTML for the portal pages that display HL7
content. This is a good approach if you need to automatically generate XML
for many different kinds of input HL7 documents and you don't want to code a
lot of distinct DTLs nor generate a huge number of XML classes and object
instantiations of them to represent your output XML document.
ToEasyXML() is now deprecated - it was never documented nor recommended for
customer use and we found we didn't have a good use for it internally
either. The problem is, every XML output schema is different and there is
no such thing as generic XML output. We plan to supersede toEasyXML() with a
framework for calling customer-written HL7 importXML and exportXML methods
and examples of each.
Ted