Re: MySQL import of XML

From: Thomas 'PointedEars' Lahn <PointedEars_at_web.de>
Date: Sat, 18 Jul 2015 23:32:34 +0200
Message-ID: <1681113.xoF98WJUhW_at_PointedEars.de>


Bjarne Jensen wrote:

> Whatever PointedEars ment to say -

I meant to say that you should RTFM! Where it says that there are three variants for XML data that is accepted by the LOAD XML statement. Yours was none of them.

> I did some search & replace and ended
> up with a file where all lines began with "<text" like
>
> <text number="2">
> <text top="164" left="450" width="47" height="10">02MAR15</text>
> ....
> </text>

Yes, that has always been one possibility. For sure you had to transform your XML or change your columns to make it compatible with the import feature. Here, MySQL graciously assumed that your parent “text” element was meant to set the `number` column, with the “number” attribute, for all nested “text” elements…

-- 
PointedEars

Twitter: _at_PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
Received on Sat Jul 18 2015 - 23:32:34 CEST

Original text of this message