From: Tom W. <tw...@su...> - 2013-12-18 20:29:30
|
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 |