a apiary.
← All tools

JSON & XML / BROWSER UTILITY

XML to SQL Script

Map an XML template to static values, columns and expressions, then generate Oracle SQL that builds the XML.

Processed locally in your browser. Your data is not uploaded.

Oracle SQL · XML is a template. Sample values are suggestions you can replace with database mappings.

Large or complex XML files may temporarily slow your browser, particularly on older devices. Processing stays on your device. Safety limits reduce the risk of freezing, but cannot prevent every browser slowdown or crash.

Local UTF-8 files up to 4 MB. Up to 1,000,000 characters, 20,000 elements, 100,000 total nodes and 100 nesting levels. DTDs and entities are blocked.

Good to know

Use XML as a structural template for Oracle SQL. Map leaves and attributes to static text, SQL columns or SQL expressions. One selected child group can repeat for query rows; its XMLAGG runs inside a scalar subquery, with static outer wrappers. Without repetition, the query returns one document per source row. NULL leaf content contributes no text to the enclosing XMLELEMENT; the enclosing tag remains. NULL attributes are omitted, and Oracle treats empty strings as NULL. This tool does not execute SQL or validate your database schema. Save the complete CLOB result using a UTF-8 database client export. Formatting and lexical details of the imported XML are not preserved.

Example: Import the generic ExportTask example, mark Record as repeating, map Code to r.code, and enter records r as the FROM source.