Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JSBSim-Team/jsbsim
/ CheckXMLFile
Function
CheckXMLFile
python/JSBSim.py:74–85 ·
view source on GitHub ↗
(f)
Source
from the content-addressed store, hash-verified
72
73
74
def
CheckXMLFile(f):
75
# Is f a file ?
76
if
not os.path.isfile(f):
77
return
None
78
79
# Is f an XML file ?
80
try
:
81
tree = et.parse(f)
82
except
et.ParseError:
83
return
None
84
85
return
tree
86
87
88
if
args.input:
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected