Documentation

Import XML

XML is a standard file format for structured data. You can import import records, record types, display types, and building blocks from XML files.

The Import XML command on the Database menu is used to import XML in Axisbase format. If you have XML in another format, you can create a Data Outsource to load it.

Sources of XML data

You can create the XML files from Axisbase:

  • When vieweing records in a list, use the Export command from the context menu

  • When viewing record types or display types on the database Properties window, use the Export button

  • When viewing builing blocks in the Building Blocks window, use the Export button.

You can also create XML from an external system. Generally this involves coding or scripting in order to match the format expected by Axisbase.

You can also combine XML files created by Axisbase and/or other systems in Notepad into one file, if you are careful to preserve the XML format. In particular, there must be exactly one <axisbase1> tag at the top, and one closing tag </axisbase1> at the bottom. This is useful if you want to distribute a complete sample database in text format.

XML format - general

The outer document tag is <axisbase1 />. See the following sections for a description of the possible contents inside the axisbase1 tag.

A Document type definition file (DTD) is on the work list but has not been published yet.

XML format for records

The XML format for records is <Record RecordType=AXISID.recordtype><property>value…

For example:

<Record RecordType=SATURN.person><name>Jim Baca</name><favcolor>red</favcolor></Record>

References may be included in one of three ways

<customer ReferenceParent="true" /> - sets the reference field to the key of the parent

<customer>123</customer> - sets customer to a known key value

<customer ReferenceField="custid">0803-0003</customer> - sets customer to the one whose custid=0803-0003

When Axisbase exports records, it uses these rules:

  • If the column (property) name starts with the table name, the prefix is removed.

  • Key properties are included (but may not be useful outside the source database)

  • Dates are in a standard .NET portable date format

  • Values of type bool are exported as “true” and “false”.

  • If a nested list is exported, the detail records are included inside the master record, and references from the detail record to the master record are included using the ReferenceParent syntax.


Importing Record types

If the XML contains record types, you are given a choice of which database to import to or whether to import each type.

If the imported type already exists in the database, Axisbase will compare the new type with the existing type, and only change what is needed to match the new type. For example, if you have a development database and a separate production (live) database, you may add properties to the types in the production database. In order to propogate those changes to the live database, you can export all the types from the development database and import them all into the production database.
(c) 2014-2015 Divergent Labs, Inc.