Three-address code versus JSON, XML, etc
XML and JSON are formats for representing data. The actual kind of data depends upon how you use them. For instance, they could be used to represent 3-address intermediate code or an abstract syntax tree, or even a symbol table.

3-address intermediate code is best generated only at the very end, as input to the code generator. For all other passes, keep as much information around as possible. This could include a decorated abstract syntax tree (decorated with types and other information) and a symbol table.

In fact, I'd only use the 3-address format if you are generating assembly. For a higher level target language, use a higher-level intermediate format.