I am using xml2js provided by node.
Right now I receive XML from mobile client for chat purpose and they can't control the flow of xml.
So I receive xml like -
<presence id="5zQIb-45" type="available"></presence><message id="5zQIb-44" to="singlechat_1222_1265_1473070385075@conference.mobdev3" type="groupchat"><body>5zQIb-44|$|$|$|$|$|$|Hello Message</body><request xmlns="urn:xmpp:receipts"/></message>
Now when I parse this I get only first xml that is presence json like this-
{"presence":{"$":{"id":"5zQIb-45","type":"available"}}}
The message xml is not parsed.
Can anyone please suggest how to solve it.