XMLAGG and XMLELEMENT Equivalent

What is the SQL equivalent to: rtrim(xmlagg(xmlelement (f, locations ||',')).extract ('//text()'), ',') ?

Thanks