Diogo Alves
Diogo Alves

Reputation: 11

XML to phpmyadmin

I want to import a XMl file into phpmyadmin.

I have a XML file with 75000 lines so inserting individually the values is a huge no, when I try to import the file as XMl to the database it gave the following message:

Import has been successfully finished, 0 queries executed. 

The following structures have either been created or altered. Here you can:
View a structure's contents by clicking on its name.
Change any of its settings by clicking the corresponding "Options" link.
Edit structure by following the "Structure" link.

wp_db (Options)
(xmlfile.xml)

-----------------------------------------------------------------------

Notice in ./libraries/plugins/import/ImportXml.php#158
Undefined index: pma

Backtrace

./import.php#652: PMA\libraries\plugins\import\ImportXml->doImport(array)

The phpmyadmin is behind MAMP, a short version of the xml file looks like this:

<Report>
    <Row1>
        <Reference>123</Reference>
        <Nature>Outside</Nature>
        <Disponibility>Full</Disponibility>
        <State>In progress</State>
        <Person>Jon</Person>
        <Seller></Seller>
    </Row1>
    <Row2>
        <Reference>123</Reference>
        <Nature>Outside</Nature>
        <Disponibility>Full</Disponibility>
        <State>In progress</State>
        <Person>Jon</Person>
        <Seller></Seller>
    </Row2>
</Report>

If it's not possible at least what is the easiest way to do it? Thanks!

Upvotes: 0

Views: 2954

Answers (1)

Marc Delisle
Marc Delisle

Reputation: 8997

phpMyAdmin supports importing XML only if it follows a special format. You can see the exact format by exporting in phpMyAdmin a table in XML. You would need to programmatically modify your existing file to adapt to the supported format.

Upvotes: 1

Related Questions