User:DrewJensen/XML export

From Apache OpenOffice Wiki
< User:DrewJensen
Revision as of 15:45, 20 September 2006 by DrewJensen (Talk | contribs)

Jump to: navigation, search

CSV file formatted data is still commonly used and is arguably the first required format for any database export utility. However, XML is rapidly approaching a par as being the other first required data export format.

The default database , HSQLDB, as incorporated into Base currently has no XML generating capabilities

In parallel with the work on the CSV export I propose work on a simple XML export also. This effort will utilize parts of the basic library being created for the former. This effort will be therefore to produce the first implementation in OOBasic as much as a prototype as anything.

Much of the information needed to handle this function is identical to that required for any export. It will mimic the filing naming scheme used by the CSV export. The two export types will share a common export definition manager.

The XML export should support a number of different modes.

At it simplest it would generate a file containing a sequence of XML tags and values mirroring the data format in an CSV file. This would be a type of flat data dump in other words.

Another mode would be a simple group oriented nested output. This might be simply an object named <ExportObjectName><Row Name><seq>Columns</seq></RowName></ExportObjectName> format.

Finally a mode using a mapping file to represent more complex data structures. One possibility of a format for this would be an XSD file.

Existing Tools

For the first pass at this some existing, very simple, routines will be employed. These can be found at the Code Snippet list on OOoForum.

There is nothing fancy about these routines, mosting just stinr manipulation stuff. With one exception the use of a Basic structure to map columns to XML data members. This mapping scheme is just expansive enough to handle simple hierarchical data structures. But nothing close to what can be done with XSD dictionary. However, a simple mapp may be all that is necessary for the vast majority of exporting needs.

The major goal of the first pass will be to have a simple way for the user to create these map files for a particular export.

An interface needs to be designed ( function ) that would allow this map to be handed to the Export Manager being built for storage of this map file - allowing it to be used again later.

Personal tools