[vtk-developers] VTK XML File Formats
Brad King
brad.king at kitware.com
Tue Dec 31 17:10:27 EST 2002
Mike,
I have just checked in changes to the XML reader/writer classes to use
platform-independent data types in the files. After further study of the
XML schema you mentioned, I decided to NOT use the names it gives. The
document specifies these names for use in specifying the data types
expected in OTHER xml documents (for use in a schema). Parsers that
understand that document will not know to look for these names in the VTK
files anyway.
I chose the following names, which I believe are very unambiguous and
easily expanded in the future. It is also obvious that they are not C
types:
Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64
Byte-swapping is automatically handled, and the endian-ness is specified
by an attribute of the VTKFile element at the top of the file. All
portability problems should now be solved.
I decided to not rename "ascii" or "binary" data modes as part of these
changes because these names are a separate issue. Having thought about it
more, I don't see any problem with "ascii". After all, the file's
character set is "ascii". For "binary", the name indicates that the data
are in binary form inline inside the element. If we ever decide to add
another encoding option other than base64, we can add another attribute to
specify it (similar to how the "appended" data mode requires the "offset"
attribute).
Comments?
-Brad
More information about the vtk-developers
mailing list