An overview of ArcGIS Image Server XML

ArcGIS Image Server utilizes Extensible Markup Language (XML) extensively for storing the definitions and properties of image services and raster datasets and for passing data between components such as service provider and client. The XML used within ArcGIS Image Server is standard but the method by which it is defined is not. The structure of an XML is defined using an XML Attribute Definition (XADef) and forms are created dynamically from the XMLs using XML Form Definitions (XFDefs).

XADef

Instead of using standard XML Schemas, the structure of an XML used in ArcGIS Image Server is defined using an XADef. The XADef is similar in concept to both a Document Type Definition (DTD) and an XML schema. It is more detailed than a DTD, but simpler in structure than a full XML Schema. The XADef is a section of XML that has the same structure as the required XML along with some additional attributes added to each node or attribute that is used to define various properties of the XML node or attribute. The properties define not only the description of the node, but its type, what should be displayed, and how it should be validated. The XADef can be included as part of the XML or the XML can include a reference to an external file.

XFDef

ArcGIS Image Server uses a large number of data entry forms that are related to the XMLs. These forms pop up when a user is required to enter information to be stored in an XML or when the content of the XML is to be viewed. These forms exist for image service editor properties, raster properties, and so on. When parameters for a raster type are entered, and when properties of an image service are displayed by the client. These forms are dynamically generated from similar XML code called XML Form Definitions (XFDefs). XFDefs are similar to XADefs and can be included into the XML or referenced to an external file. The XFDef primarily defines how the XML should be displayed in a form.

Source of ArcGIS Image Server XMLs

To create a new image service, the relevant ArcGIS Image Server component needs to create a new XML. There are templates available to create the XMLs, which define the XADef. These XADefs are generally stored in C:\Program Files\ArcGIS\Image Server\XADefs. It is strongly advised not to change these XADefs as they may affect how ArcGIS Image Server runs. Developers need to make a copy of the XADefs and then load the XADefs into an XML editor. This will enable them to understand the ArcGIS Image Server data structures. In C:\Program Files\ArcGIS\ImageServer10.0\Developer Kit\, an XML directory contains standard XML schemas that correspond to the the main ArcGIS Image Server XADefs. The XML Schema Definition (.XSD) files are provided to help developers use programs that utilize XML schemas. It should be noted that these XSD files are not used by ArcGIS Image Server and there may be discrepancies with the content and definition in the XADefs.

Linking an XML to an XADef or XFDef

For an XML to automatically link to an XADef or XFDef when loaded into ArcGIS Image Server, it must contain the following nodes:

either

<X_DEF>

  <XADef_Path>test.XADef</XADef_Path>  

  <XFDef_Path>test.XFDef</XFDef_Path>

 </X_DEF>

or

<X_DEF>

  <XADef_XPath>//test</XADef_XPath>

  <XFDef_XPath>//test</XFDef_XPath>

 </X_DEF>

were in this example:

test.XADef and test.XFDef are files in the default directory

//Test is the Xpath to the same structure in the current file.

With the X_DEF notes one can also specify a <HELP_PATH> node that is used to point to a help file related to the XML. For example:

<HELP_PATH>c:\help\help.html</HELP_PATH>

would indicate that the help file to be used when required is c:\help\help.html.

ISXMLUI.exe

ArcGIS Image Server XML User Interface (ISXMLUI) is a program that can be used to view generated forms based on XADef and XFDef files or any valid XML. ISXMLUI is not directly used within ArcGIS Image Server, which uses mml.dll. ISXMLUI can be used to check any XADefs or XFDefs and as a data entry form for XML. The command line syntax is:

ISXMLUI XML

Where XML can be either a

XML file
XML file plus Xpath to a specific XML node
XADef file

In case an XML file does not contain the required <X_DEF> node the XML will be displayed without formatting or validation. ISXMLUI is not designed to handle very large XMLs. If an XADef is used as input, on saving the files the specific XADef attributes will be stripped of the XML. This can be used to create blank XML files that only contain default values.