Encode XML string to EXI and send it through a websocket

view story

http://stackoverflow.com – First of all I am using a client-server architecture, android for the client and node.js for the server, they are connected through Socket.io library, so, they are using websockets. The doubt that I have is that I am generating a XML string with XMLSerializer from Java, I want to encode it to EXI and send it to a server, thus, is it possible doing the encode XML-EXI without using files? directly from string to string? because all examples I see assume that my XML is in a file and I want the output into another file. Another doubt is, can I just send the EXI as string? because I have already e (HowTos)