make use of is_xml()

We have a function is_xml, but it's not used anywhere. This patch
calls is_xml where appropriate.

Change-Id: I7909410f4e4db46837e618350da7c93bf31271ce
Merge "make use of is_xml()"