ARTS 2.5.11 (git: 6827797f)
|
This file contains basic functions to handle XML data files. More...
#include "xml_io.h"
#include "arts.h"
#include "bifstream.h"
#include "bofstream.h"
#include "file.h"
#include "parameters.h"
Go to the source code of this file.
Functions | |
void | xml_find_and_open_input_file (std::shared_ptr< istream > &ifs, const String &filename, const Verbosity &verbosity) |
Open plain or zipped xml file. | |
void | xml_data_parse_error (ArtsXMLTag &tag, String str_error) |
Throws XML parser runtime error. | |
void | filename_xml (String &filename, const String &varname) |
Gives the default filename for the XML formats. | |
void | filename_xml_with_index (String &filename, const Index &file_index, const String &varname, const Index &digits) |
Gives the default filename, with file index, for the XML formats. | |
This file contains basic functions to handle XML data files.
Definition in file xml_io.cc.
Gives the default filename for the XML formats.
The default name is only used if the filename is empty.
filename | filename |
varname | variable name |
Definition at line 183 of file xml_io.cc.
References out_basename.
Referenced by ReadXML(), and WriteXML().
void filename_xml_with_index | ( | String & | filename, |
const Index & | file_index, | ||
const String & | varname, | ||
const Index & | digits | ||
) |
Gives the default filename, with file index, for the XML formats.
The default name is only used if the filename is empty.
[out] | filename | filename |
[in] | file_index | Index appended to the filename |
[in] | varname | variable name |
[in] | digits | Width for padding with zeros |
Definition at line 199 of file xml_io.cc.
References out_basename.
Referenced by ReadXMLIndexed(), and WriteXMLIndexed().
void xml_data_parse_error | ( | ArtsXMLTag & | tag, |
String | str_error | ||
) |
Throws XML parser runtime error.
This is used quite often inside the data parsing routines so it's a function for itself.
tag | ArtsXMLTag |
str_error | Error description |
Definition at line 162 of file xml_io.cc.
References XMLTag::write_to_stream().
Referenced by xml_parse_from_stream(), and xml_read_from_stream().
void xml_find_and_open_input_file | ( | std::shared_ptr< istream > & | ifs, |
const String & | filename, | ||
const Verbosity & | verbosity | ||
) |
Open plain or zipped xml file.
Searches the include and data paths for the given filename.
[out] | ifs | Pointer to input file stream |
[in] | filename | Input filename |
[in] | verbosity | Verbosity |
Definition at line 119 of file xml_io.cc.
References CREATE_OUT2, find_xml_file(), and xml_open_input_file().
Referenced by ReadArrayOfARTSCAT(), and ReadARTSCAT().