31#include "FGXMLFileRead.h"
32#include "simgear/io/iostreams/sgstream.hxx"
40Element* FGXMLFileRead::LoadXMLDocument(
const SGPath& XML_filename,
41 FGXMLParse& fparse,
bool verbose)
44 SGPath filename(XML_filename);
45 if (!filename.isNull()) {
46 if (filename.extension().empty())
47 filename.concat(
".xml");
48 infile.open(filename);
49 if ( !infile.is_open()) {
50 if (verbose) std::cerr <<
"Could not open file: " << filename << std::endl;
54 std::cerr <<
"No filename given." << std::endl;
57 readXML(infile, fparse, filename.utf8Str());
58 Element* document = fparse.GetDocument();