In Oracle the XMLAGG is an aggregate function that allows you to built XML from individual elements. PostgreSQL also has the XMLAGG function, so no conversion is required.
Oracle:
-- Built XML from elements SELECT XMLAGG( XMLTYPE('<employee>' || ename || '</employee>') ORDER BY ename) FROM emp; # Result (single row): # <employee>ADAMS</employee><employee>ALLEN</employee>...
PostgreSQL:
-- Built XML from elements SELECT XMLAGG( XMLPARSE(CONTENT '<employee>' || ename || '</employee>') ORDER BY ename) FROM emp; # Result (single row): # <employee>ADAMS</employee><employee>ALLEN</employee>...
For more information, see Oracle to PostgreSQL Migration.