@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { FIXMLRoot root = (FIXMLRoot) source; writer.addAttribute("v", root.getVersion()); writer.addAttribute("r", root.getReleaseDate()); writer.addAttribute("s", root.getSchemaDate()); context.convertAnother(root.getMessage()); }
public Message toFIX(String fixml) { if (!initialized) { initialize(); } FIXMLRoot root = (FIXMLRoot) xstream.fromXML(fixml); return root.getMessage(); }