Home > atmlab > arts > xml > xmlReadSpeciesTag.m

xmlReadSpeciesTag

PURPOSE ^

Reads a SpeciesTag from an XML file.

SYNOPSIS ^

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

DESCRIPTION ^

 Reads a SpeciesTag from an XML file.

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

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

 OUT   result     SpeciesTag
 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

xmlReadSpeciesTag.m

SOURCE CODE ^

0001 % Reads a SpeciesTag from an XML file.
0002 %
0003 %    Internal function that should never be called directly.
0004 %    Use *xmlLoad* instead.
0005 %
0006 % FORMAT   result = xmlReadSpeciesTag(fid, attrlist, itype, ftype, binary, fid2)
0007 %
0008 % OUT   result     SpeciesTag
0009 % IN    fid        File descriptor of XML file
0010 % IN    attrlist   List of tag attributes
0011 % IN    itype      Integer type of input file
0012 % IN    ftype      Floating point type of input file
0013 % IN    binary     Flag. 1 = binary file, 0 = ascii
0014 % IN    fid2       File descriptor of binary file
0015 
0016 % 2002-12-13   Created by Oliver Lemke.
0017 
0018 function result = xmlReadSpeciesTag(fid, attrlist, itype, ftype, binary, fid2)
0019 
0020 c = fgets (fid, 1);
0021 while ~feof (fid) && (c == 10 || c == 32)
0022   c = fgets (fid, 1);
0023 end
0024 
0025 if c ~= '"'
0026   error ('Invalid species tag: Not starting with "');
0027 end
0028 
0029 result = '';
0030 c = fgets (fid, 1);
0031 while ~feof (fid) && c ~= '"'
0032   result = [result c];
0033   c = fgets (fid, 1);
0034 end
0035 
0036 result = strtrim(result);
0037 
0038 if c ~= '"'
0039   error ('Invalid species tag: Not ending with "');
0040 end
0041 
0042

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