VTK
VTK XML Reader/Writer Information Format

Overview

The vtk xml data file readers / writers store certain vtkInformation entries that are set on vtkAbstractArray's GetInformation() object. Support is currently limited to numeric and string information keys, both single- and vector-valued. Only the information objects attached to arrays are written/read.

Array Information

Array information is embedded in the <DataArray> XML element as a series of <InformationKey> elements. The required attributes name and location specify the name and location strings associated with the key – for instance, the vtkDataArray::UNITS_LABEL() key has name="UNITS_LABEL" and location="vtkDataArray". The length attribute is required for vector keys.

1 <DataArray [...]>
2  <InformationKey name="KeyName" location="KeyLocation" [ length="N" ]>
3  [...]
4  </InformationKey>
5  <InformationKey [...]>
6  [...]
7  </InformationKey>
8  [...]
9 </DataArray>

Specific examples of supported key types:

vtkInformationDoubleKey

1 <InformationKey name="Double" location="XMLTestKey">
2  1
3 </InformationKey>

vtkInformationDoubleVectorKey

1 <InformationKey name="DoubleVector" location="XMLTestKey" length="3">
2  <Value index="0">
3  1
4  </Value>
5  <Value index="1">
6  90
7  </Value>
8  <Value index="2">
9  260
10  </Value>
11 </InformationKey>

vtkInformationIdTypeKey

1 <InformationKey name="IdType" location="XMLTestKey">
2  5
3 </InformationKey>

vtkInformationStringKey

1 <InformationKey name="String" location="XMLTestKey">
2  Test String!
3 Line2
4 </InformationKey>

vtkInformationIntegerKey

1 <InformationKey name="Integer" location="XMLTestKey">
2  408
3 </InformationKey>

vtkInformationIntegerVectorKey

1 <InformationKey name="IntegerVector" location="XMLTestKey" length="3">
2  <Value index="0">
3  1
4  </Value>
5  <Value index="1">
6  5
7  </Value>
8  <Value index="2">
9  45
10  </Value>
11 </InformationKey>

vtkInformationStringVectorKey

1 <InformationKey name="StringVector" location="XMLTestKey" length="3">
2  <Value index="0">
3  First
4  </Value>
5  <Value index="1">
6  Second (with whitespace!)
7  </Value>
8  <Value index="2">
9  Third (with
10 newline!)
11  </Value>
12 </InformationKey>

vtkInformationUnsignedLongKey

1 <InformationKey name="UnsignedLong" location="XMLTestKey">
2  9
3 </InformationKey>