Is there a command for generating an empty symbol with an output size of 0?

Just so you know, Typst supports reading xml directly: XML Function – Typst Documentation

You may be interested in these other threads:

Also to reiterate: if you use raw blocks (```...```), you don’t need to escape Typst control commands. Raw blocks can also use more that three backticks (e.g. (``````...``````) if you can’t guarantee that your inputs won’t contain ```. But you get around all needs for escaping by loading the data from file instead of putting it in your Typst source code.