def get_file_tree(file_path):
sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
CommonUtil.ExecLog(sModuleInfo, "Function: get_file_tree", 1)
try:
#Function to get the file parse
doc = ET.parse(file_path)
#Function to get the file tree
tree = doc.getroot()
# CommonUtil.ExecLog(sModuleInfo, "%s" % ET.tostring(tree), 1)
return (tree, doc)
except Exception:
errMsg = "Unable to get the file tree."
return CommonUtil.Exception_Handler(sys.exc_info(),None,errMsg)
BuiltInFunctions_XML.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录