The formatter (QP5 v5.404, Toad 17.1) cannot format if XMLTABLE is in the package, procedure or function or script. Is this a bug?
Example:
/* Formatted on 11.07.2024 15:58:06 (QP5 v5.404) */
declare
TYPE custom_cur IS REF CURSOR;
v_custom_cur custom_cur;
BEGIN
OPEN v_custom_cur FOR
SELECT *
FROM XMLTABLE (
'/xml/data'
PASSING xmltype (
parse_url (
'www.test.com/returnxml.php'))
COLUMNS "column1" VARCHAR2 (255) PATH 'column1',
"column2" VARCHAR2 (255) PATH 'column2',
"column3" VARCHAR2 (255) PATH 'column3',
"column4" VARCHAR2 (255) PATH 'column4');
LOOP
null;
END LOOP;
END ;