I have this simple method to serialize an HL7 message to XML for later 
processing with XSLT.

       public static String serializeHl7Xml(Message msg) {
              // Now serialize to XML
              // instantiate an XML parser
              XMLParser xmlParser = new DefaultXMLParser();
              // encode message in XML
              String messageXML = null;
              try {
                     messageXML = xmlParser.encode(msg);
              } catch (HL7Exception e) {
                     // TODO Auto-generated catch block
                     e.printStackTrace();
              }
              // print XML-encoded message to standard out
              return messageXML;
       }

When I run it, I get an empty NTE tag after every OBX, which is messing up my 
XSLT. I can ignore it, but it seems like it shouldn't be producing <NTE/> when 
there is no NTE segment in the HL7 message.

Anyone else see this behavior?

-tom

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to