Import XML File (Tables Menu)


 

DBExplorer can import data from an XML format file. Upon selection of this function, a form is displayed and the import specifications may be defined.

 

importxml.jpg

 

Import Dialog Items

Import into table
The name of the currently selected table that is the destination for the data imported.
Import file
The name of the source file. A browse button is provided to allow file selection.
Table name
The name of the table record in the XML file.
Row name
The name of the row record in the XML file.
Initial records to skip
The number of initial records to skip during the import process.
Inserts per transaction
The database inserts are batched into a transaction during the import process for improved performance. Adjusting this value from its default of zero (0) will decrease performance but offer some protection in the event of a failure.
Drop existing rows
Allows any existing data to be first deleted.
File resides on the client
If running under client server, allows the import file to be opened on the client rather than the server.
Log SQL inserts
This option causes the individual insert statements to be logged to the message window. Setting this option will degrade the performance of the import.
Columns
The name of the columns to be imported. Columns may be excluded by clearing the check box on the appropriate line.
Progress
The progress section shows the record count and a progress bar. A stop button allows the import to be aborted.

 

The imported data should be in the following format where "TableName" is the specified table name and "RowName" is the specified row name.

 

<?xml version="1.0" encoding="UTF-8"?>

<TableName>

  <RowName>

    <CUSTID>2</CUSTID>

    <COMPANY>Company2</COMPANY>

    <ADDRESS>Address2</ADDRESS>

    <CITY>City2</CITY>

    <REGION>Region2</REGION>

    <POSTALCODE>PostalCode2</POSTALCODE>

    <COUNTRY>Country2</COUNTRY>

    <PHONE>Phone2</PHONE>

  </RowName>

  <RowName>

    <CUSTID>3</CUSTID>

    <COMPANY>Company3</COMPANY>

    <ADDRESS>7577188</ADDRESS>

    <CITY>USA</CITY>

    <REGION>123-567-9012</REGION>

  </RowName>

...

</TableName>

 


About DB Explorer Import ODBC (Tables Menu) Export CSV File (Tables Menu)