[vtkusers] XML File Format Examples?
Jean M. Favre
jfavre at cscs.ch
Wed May 21 02:39:07 EDT 2003
> Daniel C Go wrote:
>
> Hello VTKers,
>
> After doing some search, I am wondering if anyone knows where I can
> find examples using various XML
Here is an example of a Parallel XML file encoding two pieces. Each
piece is itself an XML file which you can read stand-alone. It's ASCII
for everyone's enlightement.
You may create other file examples by using the XMLwriters after reading
conventional VTK-formatted datasets.
--
Dr. Jean M. Favre, email:favre at cscs.ch
http://www.cscs.ch/people/Favre.html
CSCS, Swiss Center for Scientific Computing | Tel: +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
-------------- next part --------------
<?xml version="1.0"?>
<VTKFile type="PUnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<PUnstructuredGrid GhostLevel="0">
<PCellData Scalars="temperature">
<PDataArray type="Float32" Name="temperature" format="ascii"/>
<PDataArray type="Float32" Name="pressure" format="ascii"/>
</PCellData>
<PPoints>
<PDataArray type="Float32" NumberOfComponents="3" format="ascii"/>
</PPoints>
<Piece Source="quads.vtu"/>
<Piece Source="tris.vtu"/>
</PUnstructuredGrid>
</VTKFile>
-------------- next part --------------
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="9" NumberOfCells="4">
<CellData>
<DataArray type="Float32" Name="temperature" format="ascii">
1 3 5 7 9 1
2 1 8 6 4 2
</DataArray>
<DataArray type="Float32" Name="pressure" format="ascii">
2 4 6 8 10 12
11 9 7 5 3 1
</DataArray>
</CellData>
<Points>
<DataArray type="Float32" NumberOfComponents="3" format="ascii">
0 0 0 -1 -1 0
1 -1 0 1 1 0
-1 1 0 0 -1 0
1 0 0 0 1 0
-1 0 0
</DataArray>
</Points>
<Cells>
<DataArray type="Int32" Name="connectivity" format="ascii">
1 5 0 8 5 2
6 0 0 6 3 7
0 7 4 8
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
4 8 12 16
</DataArray>
<DataArray type="UInt8" Name="types" format="ascii">
9 9 9 9
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
-------------- next part --------------
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="13" NumberOfCells="8">
<CellData>
<DataArray type="Float32" Name="temperature" format="ascii">
11 13 15 17 19 11
12 10 18 16 14 12
</DataArray>
<DataArray type="Float32" Name="pressure" format="ascii">
4 2 6 8 10 12
11 9 7 5 3 1
</DataArray>
</CellData>
<Points>
<DataArray type="Float32" NumberOfComponents="3" format="ascii">
-1 -1 0 -1 -1 0
1 -1 0 1 1 0
-1 1 0 0 -2 0
2 0 0 0 2 0
-2 0 0 0 -1 0
1 0 0 0 1 0
-1 0 0
</DataArray>
</Points>
<Cells>
<DataArray type="Int32" Name="connectivity" format="ascii">
1 5 9 9 5 2
2 6 10 10 6 3
11 3 7 11 7 4
8 12 4 1 12 8
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
3 6 9 12 15 18
21 24
</DataArray>
<DataArray type="UInt8" Name="types" format="ascii">
5 5 5 5 5 5
5 5
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
More information about the vtkusers
mailing list