public XmlDocument parseXMLDoc(string key) { XmlDocument xmlDoc = null; try { xmlDoc = AESHelper.decryptXML(filePath, key); } catch (Exception e) { MessageBox.Show("无法读取文件,请确保秘钥是否正确!"); return(null); } return(xmlDoc); }
public EAPackage parse(string key) { XmlDocument xmlDoc = null; try { xmlDoc = AESHelper.decryptXML(filePath, key); } catch (Exception e) { return(null); } XmlNode faceModelNode = xmlDoc.LastChild; XmlElement faceModelElement = faceModelNode as XmlElement; String name = faceModelElement.GetAttribute("name"); EAPackage rootPackage = new EAPackage(name, defaultRootPackageSterotype); generatePackageFromXMLNode(rootPackage, faceModelNode); return(rootPackage); }