Here there is the function:
See also Insert IMAGE BLOB in Oracle Database.
FUNCTION get_image_xmp_metadata (ID IN wh_timage.id_image%TYPE)
RETURN VARCHAR2
IS
res VARCHAR (4000);
image_src ORDSYS.ORDIMAGE;
metav xmlsequencetype;
BEGIN
res := '';
SELECT im.image
INTO image_src
FROM wh_timage im
WHERE im.id_image = ID;
metav := image_src.getmetadata ('XMP');
FOR i IN 1 .. metav.COUNT
LOOP
res := res || metav (i).getstringval ();
END LOOP;
RETURN res;
END;