Home > atmlab > arts > xml > xmlReadGFieldWrapper.m

xmlReadGFieldWrapper

PURPOSE ^

Reads a GField from an XML file.

SYNOPSIS ^

function result = xmlReadGFieldWrapper(fid, attrlist, itype, ftype, binary, fid2, dim)

DESCRIPTION ^

 Reads a GField from an XML file.

    Internal function that should never be called directly.
    Use *xmlLoad* instead.

    Calls *xmlReadTag* for every member of the GField structure.

 FORMAT   result = xmlReadGFieldWrapper(fid, attrlist, itype, ftype, binary, fid2, dim)

 OUT   result     GField
 IN    fid        File descriptor of XML file
 IN    attrlist   List of tag attributes
 IN    itype      Integer type of input file
 IN    ftype      Floating point type of input file
 IN    binary     Flag. 1 = binary file, 0 = ascii
 IN    fid2       File descriptor of binary file
 IN    dim        Dimension of the GField to read

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

xmlReadGFieldWrapper.m

SOURCE CODE ^

0001 % Reads a GField from an XML file.
0002 %
0003 %    Internal function that should never be called directly.
0004 %    Use *xmlLoad* instead.
0005 %
0006 %    Calls *xmlReadTag* for every member of the GField structure.
0007 %
0008 % FORMAT   result = xmlReadGFieldWrapper(fid, attrlist, itype, ftype, binary, fid2, dim)
0009 %
0010 % OUT   result     GField
0011 % IN    fid        File descriptor of XML file
0012 % IN    attrlist   List of tag attributes
0013 % IN    itype      Integer type of input file
0014 % IN    ftype      Floating point type of input file
0015 % IN    binary     Flag. 1 = binary file, 0 = ascii
0016 % IN    fid2       File descriptor of binary file
0017 % IN    dim        Dimension of the GField to read
0018 
0019 % 2008-07-02       Created by Oliver Lemke.
0020 
0021 function result = xmlReadGFieldWrapper(fid, attrlist, itype, ftype, binary, fid2, dim)
0022 
0023   result.name = xmlGetAttrValue (attrlist, 'name');
0024 
0025   for i = 1:dim
0026     [result.grids{i}, attr] = xmlReadTag(fid, '', itype, ftype, binary, fid2);
0027     result.gridnames{i} = xmlGetAttrValue (attr, 'name');
0028   end
0029 
0030   [result.data, attr]    = xmlReadTag(fid, '', itype, ftype, binary, fid2);
0031   result.dataname = xmlGetAttrValue (attr, 'name');
0032

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005