How do I add the encoding="UTF-8" to the header of the xml string that
XMLParser creates from an HL7 message? From an hl7 message, I can
create an xml string with the following code:
ca.uhn.hl7v2.util.Hl7InputStreamMessageIterator hismi = new
ca.uhn.hl7v2.util.Hl7InputStreamMessageIterator(new
FileInputStream("/tmp/toto.hl7"));
ca.uhn.hl7v2.model.Message hapiMsg = null;
while (hismi.hasNext()) {
hapiMsg = hismi.next();
ca.uhn.hl7v2.parser.XMLParser xmlParser = new
ca.uhn.hl7v2.parser.DefaultXMLParser();
String ackMessageInXML = xmlParser.encode(hapiMsg);
System.out.println(ackMessageInXML);
}
The xml string has the "<?xml version="1.0"?>" header but lacks the
encoding.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel