sending XML string over websocket



I can use the following code to send a JSON msg via websocket



var msg = {
type: "message"
};
ws.send(JSON.stringify(msg));


Can I do the same in a XML format? I know XML is probably less efficient since its bigger.


Thanks


No comments:

Post a Comment