public void parseXml(string path, AtlasXmlData data) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(path); XmlNode rootNode = xmlDoc.SelectSingleNode("Root"); XmlNodeList packNodeList = rootNode.ChildNodes; XmlElement packElem; AtlasXmlPath xmlPath; AtlasXmlParentPath atlasXmlParentPath = null; foreach (XmlNode packNode in packNodeList) { packElem = (XmlElement)packNode; if (ExportUtil.getXmlAttrStr(packElem.Attributes["parentpath"]) == UtilApi.TRUE) { if (atlasXmlParentPath == null) { atlasXmlParentPath = new AtlasXmlParentPath(); } atlasXmlParentPath.parseXml(packElem, data); } else { xmlPath = new AtlasXmlPath(); data.m_pathList.Add(xmlPath); xmlPath.parseXml(packElem); } } }
public void parseXml(string path, AtlasXmlData data) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(path); XmlNode rootNode = xmlDoc.SelectSingleNode("Root"); XmlNodeList packNodeList = rootNode.ChildNodes; XmlElement packElem; AtlasXmlPath xmlPath; AtlasXmlParentPath atlasXmlParentPath = null; foreach (XmlNode packNode in packNodeList) { packElem = (XmlElement)packNode; if (ExportUtil.getXmlAttrStr(packElem.Attributes["parentpath"]) == UtilApi.TRUE) { if(atlasXmlParentPath == null) { atlasXmlParentPath = new AtlasXmlParentPath(); } atlasXmlParentPath.parseXml(packElem, data); } else { xmlPath = new AtlasXmlPath(); data.m_pathList.Add(xmlPath); xmlPath.parseXml(packElem); } } }