Convert data string to payload value

Using websockets request, I get some data from the node in a long string and I need to convert it into readable data.
The data I get looks:
msg.payload= <Navigation id='0x4f7248'><item id='0x513f30'><name>Temperatures</name></item>

And I would like to convert it into:

msg.payload.item_id='0x514880' = "Temperatures"

Or someting like that.
Someone could help me?

Try first passing it through the XML node. It looks like an xml snippet. I'm not sure how fussy that node is for "correct" xml though. Otherwise, we need to get into some serious string find and replace.

Thanks, exacly what I was looking for.
Works perfecty thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.