Introduction Elements
GML files can contain object data (the objects) and configuration data (their global properties). The <gml> root element can thus contain elements describing all the data objects defined in GAMGI, from <window>, <layer>, <light>, to <bond>, <orbital>, <text>, plus the global <gamgi> element.

As configuration data conceptually belongs to the gamgi object, it is represented inside <gamgi></gamgi> blocks. These blocks can occur in any order and as many times as needed, can contain elements describing the global properties of all the GAMGI objects, from <file>, <window>, <layer>, to <orbital>, <text>, <help>. These elements in turn can occur in any order and as many times as needed, but cannot contain other elements:

Everything outside <gamgi></gamgi> blocks is considered as object data. The elements describing data objects, from <window>, <layer>, <light>, to <bond>, <orbital>, <text>, can occur in any order and as many times as needed, can contain elements describing its child objects, in any order and as many times as needed, to any nested level of depth.

When importing GML files, objects that belong to layers and appear directly below <gml>, in the hierarchy, are attributed to the current layer. Layers that appear directly below <gml>, in the hierarchy, are attributed to the current window.

### Good:

    <gml>
      <group>
        <group/> a group can contain another group
      </group>
    </gml>

    <gml>
      <window/>
      <layer/> layer belongs to current window, not the new window
      <atom/> atom belongs to current layer, not the new layer
    </gml>

    <gml>
      <gamgi>
        <atom/> update atom configuration data
      </gamgi>
    </gml>

### Bad:

    <gml>
      <gamgi>
        <window>
        </gamgi> last element in, must be first element out
      </window>
    </gml>

    <gml>
      <molecule>
        <molecule/> a molecule cannot contain another molecule
      </molecule>
    </gml>

    <gml>
      <gamgi>
        <layer>
          <atom/> a layer configuration element cannot contain other objects
        </layer>
      </gamgi>
    </gml>

Home