/** * Returns a "standardized" equivalent of the given message string. For delimited * messages, the returned value is the shortest string that has an equivalent * meaning in HL7. For XML-encoded messages, the returned value is equivalent XML output * using a standard pretty-print format. An automatic determination is made about whether * the given string is XML or ER7 (i.e. traditionally) encoded. * @param message an XML-encoded or ER7-encoded message string */ public static String standardize(String message) throws SAXException { String result = null; String encoding = parser.getEncoding(message); if (encoding.equals("XML")) { result = standardizeXML(message); } else { result = standardizeER7(message); } return result; }
/** * Returns a "standardized" equivalent of the given message string. For delimited * messages, the returned value is the shortest string that has an equivalent * meaning in HL7. For XML-encoded messages, the returned value is equivalent XML output * using a standard pretty-print format. An automatic determination is made about whether * the given string is XML or ER7 (i.e. traditionally) encoded. * @param message an XML-encoded or ER7-encoded message string */ public static String standardize(String message) throws SAXException { String result = null; String encoding = parser.getEncoding(message); if (encoding.equals("XML")) { result = standardizeXML(message); } else { result = standardizeER7(message); } return result; }