You can go through the below blog post for more details:
https://wingsoftechnology.com/oracle-...
As mentioned in the video, below is the SQL file of all the queries that I used:
https://wingsoftechnology.com/wp-cont...
Summary:
00:05 ALL_TABLES system table and why we shouldn't use it
02:30 Method-1 Using PL/SQL block
06:55 Method-2 Using DBMS_XMLGEN Package