Altova DatabaseSpy 2024 Professional Edition

Defining XML Import Options

Home Prev Top Next

The Options tab of the Import data to the database dialog box allows you to define the options when importing data from files to the database. When the XML icon on the left side of the dialog box is selected, you may change the import options for files of type XML.

tab_imp-opt-xml

 

Start point of import

You can choose to import the entire XML document or restrict your import to the data hierarchy starting from the currently selected element. The number of sub-levels below the start point that will be imported is specified in the Import Depth option.

 

Import depth

Specifies the number of sub-levels below the start point that will be imported.

 

Import fields

Depending on your XML data, you may want to import only elements, attributes, or the textual content of your elements. Note that you can deselect the import of individual elements in the Preview window.

 

Automatic fields

DatabaseSpy will produce one output file or table for each element type selected. You can choose to automatically create primary/foreign key pairs to link your data in the relational model, or define a primary key for each element.

 

Other options

The Exclude namespace name radio button, together with the Replace Colon With Underscore radio button, is an either/or choice. Specifies whether namespace prefixes of elements and attributes should be excluded or whether the colon in the namespace prefix should be replaced with an underscore.

 

Text strings in the XML document that should be treated as NULL values as well as the length of text fields in the database can be specified.

© 2017-2023 Altova GmbH