Code beautification in xml_open_gresource()