Batch import XML into MySQL TEXT

Want to batch import XML documents into MySQL TEXT (CLOB) column?

Try Withdata DBBlobEditor, a MySQL TEXT (CLOB) editor, Bulk import XML into MySQL, East and Fast.

Download DBBlobEditor Download DBBlobEditor

Batch import XML documents to MySQL TEXT (CLOB) column

Run DBBlobEditor, login to MySQL.

Batch import xml files into MySQL TEXT (CLOB) - login to MySQL

Click “Start New Task – Import LOB From Files” at task dialog.

Batch import xml files into MySQL TEXT (CLOB)  - Task Window

then show the wizard.

1. Configure import XML settings.

Batch insert xml files into MySQL TEXT (CLOB) - config

2. Bulk import XML files to MySQL TEXT (CLOB).

Batch save xml files into MySQL TEXT (CLOB)  - import

then you can see importing results

Batch import xml files into MySQL TEXT (CLOB)  - view


More about MySQL TEXT (CLOB) importer

XML → MySQL reference

Type mapping

Value kindin XMLin MySQL
Int<int>1234</int>INT
Bigint<bigint>9007199254740993</bigint>BIGINT
Decimal<decimal>1234.56</decimal>DECIMAL(p,s)
Float<float>1.234e10</float>DOUBLE
Text<char>text</char>VARCHAR(n)
Long text<text>multi-line text</text> (entities for &amp; &lt;)LONGTEXT
Date<date>2026-09-18</date> (xs:date with an XSD)DATE
Datetime<datetime>2026-09-18T14:30:00Z</datetime> (xs:dateTime)DATETIME
Binary<blob>base64...</blob> (xs:base64Binary)LONGBLOB
Boolean<bool>true</bool>TINYINT(1)
JSONescaped inside an element, or its own sub-treeJSON

Dialect differences

XML is a file format and MySQL is a database server, so the target has to be told the types the file never carried – the rows below are where the two sides diverge.

Propertyin XMLin MySQL
port—3306
identifiersAttribute values in quotes; entities (&amp; &lt; &gt;) for ...`backtick`
row limit—LIMIT n
datesText (xs:date / xs:dateTime when an XSD is in play)DATETIME, TIMESTAMP, DATE, TIME
long text—TINYTEXT / TEXT / MEDIUMTEXT / LONGTEXT
binarybase64Binary / hexBinary inside textBLOB / TINYBLOB / LONGBLOB
separatorTags, not delimiters—
encodingDeclared in the XML declaration—
typingNone in the markup itself—
shapeArbitrary treeTables of rows and columns
ceilingWhole document is usually parsed into memory—

Command line

SideCommand
MySQLmysqldump, or mysql -e "SELECT ..." > out.csv
MySQL (load)mysqlimport, or LOAD DATA INFILE

Convert your data online, free

Free in-browser converters for CSV, Excel, JSON, XML and SQL: Withdata Online Data Conversion. Large files, batch conversion or scheduling? See the offline desktop apps, or browse all data conversion tools.