Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

XML

alexhitchins's profile image alexhitchins posted 3 years ago in Import/Export Permalink

I know this is probably a simple question but I can't find what I'm after.

I have XML formatted data that I want to import to tables. Is there a tool/syntax for this somewhere?

Many thanks,

Alex

ansgar's profile image ansgar posted 3 years ago Permalink

That's not as simple as it may seem. HeidiSQL does provides a tool for importing CSV files, and for loading SQL files, but for XML there is just an export tool, not an import tool.

But probably you can compose and fire a LOAD XML LOCAL INFILE 'mydata.xml' SQL command, as documented here: https://dev.mysql.com/doc/refman/5.5/en/load-xml.html

alexhitchins's profile image alexhitchins posted 3 years ago Permalink

Thanks, I'll take a look at that link. I appreciate XML can be much more complex then CSV data, perhaps I need to just write a small utility to map nodes/elements to rows/fields for this specific job.

Again, thanks for the help.

Please login to leave a reply, or register at first.