Poorly, that's how :P
Seriously, though - yes, XMPP is absolutely a text protocol (which is one of the reasons I don't like it very much, from a developer point of view). There are a lot of extensions, though: https://xmpp.org/xmpp-protocols/xmpp-extensions/
Notably, I believe it uses Jingle...