Header section, Connection section, Header section connection section – Pitney Bowes MapXtreme User Manual

Page 487

Advertising
background image

Appendix C: Understanding the MapInfo Workspace

Structure of a Workspace

MapXtreme v7.1

494

Developer Guide

4. The MapDefinition Section contains definitions of layer, theme, and label features associated

with the workspace, such as the label details, the zoom range, the colors used, etc. Named
definitions for the map, layers, themes, styles would be included here.

An additional section in the schema is for user-defined data. This allows applications to persist their
own data. User data is a “wild card” element meaning you can enter any content you want because
it will not be validated against the schema.

For more information on named resource support in MapXtreme, see

Opening and Saving a

Workspace Containing Named Resources

.

Header Section

The file begins with the required XML file header information that describes the XML version the file
conforms to, the encoding description, and a field that indicates whether the file is a standalone. The
top level element in the file is the Workspace Element, which contains attributes for the file version,
date, and XML namespace definitions.

L

The supported encoding for workspace persistence is UTF-8 for MapXtreme.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<WorkSpace name="" version="MXP_WorkSpace_1_5"
xmlns:gml="http://www.opengis.net/gml"
xmlns="http://www.mapinfo.com/mxp">

Connection Section

The ConnectionSet section defines the database connections and file connections that are
necessary to use the workspace. Currently supported database connections include MS Windows
ODBC connections, Oracle (OCI) connections, and JDBC driver connections. File connections
identify the path to the file. What follows are some examples of these connections.

<ConnectionSet>

<DBConnection dbType="sqlserver">

<ConnectionName>JCD_SS2005_MIGS_BOUNDARY2</ConnectionName>
<ODBCConnectionString>driver={SQL Native Client};server=JODEMPSE-

W3\MIGS;database=MIUS06_BOUNDARY2;uid=MIGS;</ODBCConnectionString>

</DBConnection>

</ConnectionSet>

<ConnectionSet>
<FileConnection dbType="file">
<ConnectionName>MapStorage1_US</ConnectionName>
<FilePath>c:\data\maps</FilePath>
</FileConnection>
</ConnectionSet>

Advertising