构建基于功能清单的大学综合门户与理工大学协作系统
]]>
import xml.etree.ElementTree as ET
def parse_features(file_path):
tree = ET.parse(file_path)
root = tree.getroot()
features = {}
for feature in root.find('featureList'):
fid = feature.attrib['id']
name = feature.find('name').text
description = feature.find('description').text
features[fid] = {'name': name, 'description': description}
return features
features = parse_features('universityPortal.xml')
print(features)
]]>
本站知识库部分内容及素材来源于互联网,如有侵权,联系必删!