JSBSim Flight Dynamics Model 1.2.2 (22 Mar 2025)
An Open Source Flight Dynamics and Control Software Library in C++
Loading...
Searching...
No Matches
FGXMLFileRead Class Reference

Detailed Description

Definition at line 47 of file FGXMLFileRead.h.

+ Inheritance diagram for FGXMLFileRead:

Public Member Functions

ElementLoadXMLDocument (const SGPath &XML_filename, bool verbose=true)
 
ElementLoadXMLDocument (const SGPath &XML_filename, FGXMLParse &fparse, bool verbose=true)
 
void ResetParser (void)
 

Constructor & Destructor Documentation

◆ FGXMLFileRead()

FGXMLFileRead ( void  )
inline

Definition at line 49 of file FGXMLFileRead.h.

49{}

◆ ~FGXMLFileRead()

~FGXMLFileRead ( void  )
inline

Definition at line 50 of file FGXMLFileRead.h.

50{}

Member Function Documentation

◆ LoadXMLDocument() [1/2]

Element * LoadXMLDocument ( const SGPath &  XML_filename,
bool  verbose = true 
)
inline

Definition at line 52 of file FGXMLFileRead.h.

53 {
54 return LoadXMLDocument(XML_filename, file_parser, verbose);
55 }

◆ LoadXMLDocument() [2/2]

Element * LoadXMLDocument ( const SGPath &  XML_filename,
FGXMLParse fparse,
bool  verbose = true 
)

Definition at line 40 of file FGXMLFileRead.cpp.

42{
43 sg_ifstream infile;
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;
51 return 0L;
52 }
53 } else {
54 std::cerr << "No filename given." << std::endl;
55 return 0L;
56 }
57 readXML(infile, fparse, filename.utf8Str());
58 Element* document = fparse.GetDocument();
59 infile.close();
60 return document;
61}

◆ ResetParser()

void ResetParser ( void  )
inline

Definition at line 60 of file FGXMLFileRead.h.

60{file_parser.reset();}

The documentation for this class was generated from the following files: