detect xml and json as text