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

Transforming to xml

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

  • Transforming to xml

    While I still have some design decisions on how best to do this. Today I am transforming the incoming message to an XML format. If I use plain XML without an XSD I have to write some code that is hard to maintain to dynamically build the xml.

    e.g.

    for (i=0; i< msg['definition']['attributes']['children'].length(); i++) {
    // expand XML
    tmp['ArchetypeClusterModel'][i] = "<ArchetypeClusterModel><activeInd>1</activeInd><archetypeCategoryRef><id>0</id><display></display><idvalue></idvalue></archetypeCategoryRef><archetypeClusterId>0</archetypeClusterId><archetypeClusterRef><id>...... etc ";
    }
    // populate
    tmp['ArchetypeClusterModel'][i]['archetypeClusterRef']['idvalue'] = msg['definition']['attributes']['children']['rm_type_name'].toString();
    }

    Is there any plans to be able to define an XSD so I can programmtically extends the model e.g.

    for (i=0; i< msg['definition']['attributes']['children'].length(); i++) {
    // expand XML
    tmp['ArchetypeClusterModel'][i] = new tmp['ArchetypeClusterModel'];
    // populate
    tmp['ArchetypeClusterModel'][i]['archetypeClusterRef']['idvalue'] = msg
    }

  • #2
    Re:Transforming to xml

    Hi.

    I can't understand you well: incoming messages are allways transformed to XML (mirth works internaly with XML). Why you need XSD ? Why can't you use an output template ?

    Comment

    Working...
    X