VTK  9.0.1
/builddir/build/BUILD/VTK-9.0.1/Documentation/Doxygen/IOXMLInformationFormat.md
Go to the documentation of this file.
1 @page IOXMLInformationFormat VTK XML Reader/Writer Information Format
2 @tableofcontents
3 
4 # Overview #
5 
6 The vtk xml data file readers / writers store certain `vtkInformation`
7 entries that are set on `vtkAbstractArray`'s `GetInformation()` object. Support
8 is currently limited to numeric and string information keys, both single- and
9 vector-valued. Only the information objects attached to arrays are written/read.
10 
11 # Array Information #
12 
13 Array information is embedded in the `<DataArray>` XML element as a series of
14 `<InformationKey>` elements. The required attributes `name` and `location`
15 specify the name and location strings associated with the key -- for instance,
16 the `vtkDataArray::UNITS_LABEL()` key has `name="UNITS_LABEL"` and
17 `location="vtkDataArray"`. The `length` attribute is required for vector keys.
18 
19 ```
20 <DataArray [...]>
21  <InformationKey name="KeyName" location="KeyLocation" [ length="N" ]>
22  [...]
23  </InformationKey>
24  <InformationKey [...]>
25  [...]
26  </InformationKey>
27  [...]
28 </DataArray>
29 ```
30 
31 Specific examples of supported key types:
32 
33 ### vtkInformationDoubleKey ###
34 
35 ```
36 <InformationKey name="Double" location="XMLTestKey">
37  1
38 </InformationKey>
39 ```
40 
41 ### vtkInformationDoubleVectorKey ###
42 
43 ```
44 <InformationKey name="DoubleVector" location="XMLTestKey" length="3">
45  <Value index="0">
46  1
47  </Value>
48  <Value index="1">
49  90
50  </Value>
51  <Value index="2">
52  260
53  </Value>
54 </InformationKey>
55 ```
56 
57 ### vtkInformationIdTypeKey ###
58 
59 ```
60 <InformationKey name="IdType" location="XMLTestKey">
61  5
62 </InformationKey>
63 ```
64 
65 ### vtkInformationStringKey ###
66 
67 ```
68 <InformationKey name="String" location="XMLTestKey">
69  Test String!
70 Line2
71 </InformationKey>
72 ```
73 
74 ### vtkInformationIntegerKey ###
75 
76 ```
77 <InformationKey name="Integer" location="XMLTestKey">
78  408
79 </InformationKey>
80 ```
81 
82 ### vtkInformationIntegerVectorKey ###
83 
84 ```
85 <InformationKey name="IntegerVector" location="XMLTestKey" length="3">
86  <Value index="0">
87  1
88  </Value>
89  <Value index="1">
90  5
91  </Value>
92  <Value index="2">
93  45
94  </Value>
95 </InformationKey>
96 ```
97 
98 ### vtkInformationStringVectorKey ###
99 
100 ```
101 <InformationKey name="StringVector" location="XMLTestKey" length="3">
102  <Value index="0">
103  First
104  </Value>
105  <Value index="1">
106  Second (with whitespace!)
107  </Value>
108  <Value index="2">
109  Third (with
110 newline!)
111  </Value>
112 </InformationKey>
113 ```
114 
115 ### vtkInformationUnsignedLongKey ###
116 
117 ```
118 <InformationKey name="UnsignedLong" location="XMLTestKey">
119  9
120 </InformationKey>
121 ```