Data.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. using UnityEngine;
  2. using System;
  3. using System.IO;
  4. using System.Xml;
  5. using System.Text;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. public class Data
  9. {
  10. #region
  11. public static XmlNode PlayerNode
  12. {
  13. get
  14. {
  15. if (_PlayerNode == null)
  16. {
  17. _PlayerNode = PlayerDoc.SelectSingleNode("PlayerConfig");
  18. }
  19. return _PlayerNode;
  20. }
  21. set { _PlayerNode = value; }
  22. }
  23. public static XmlDocument PlayerDoc
  24. {
  25. get
  26. {
  27. if (_PlayerDoc == null)
  28. {
  29. int version = 0;
  30. int nativeVersion = 0;
  31. XmlNode temoNode;
  32. XmlDocument tempDoc1;
  33. XmlDocument tempDoc2;
  34. FileInfo fileInfo = new FileInfo(Application.persistentDataPath + "/PlayerConfig.xml");
  35. if (fileInfo.Exists)
  36. {
  37. StreamReader sr = new StreamReader(Application.persistentDataPath + "/PlayerConfig.xml");
  38. tempDoc1 = new XmlDocument();
  39. tempDoc1.LoadXml(sr.ReadToEnd());
  40. sr.Close();
  41. TextAsset textAsset = Bundle.Config.LoadAsset<TextAsset>("PlayerConfig");
  42. tempDoc2 = new XmlDocument();
  43. tempDoc2.LoadXml(textAsset.text);
  44. version = int.Parse(tempDoc2.SelectSingleNode("PlayerConfig").SelectSingleNode("Version").Attributes[0].Value);
  45. temoNode = tempDoc1.SelectSingleNode("PlayerConfig").SelectSingleNode("Version");
  46. if (temoNode == null)
  47. {
  48. StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
  49. sw.Write(tempDoc2.OuterXml);
  50. sw.Close();
  51. _PlayerDoc = tempDoc2;
  52. }
  53. else
  54. {
  55. nativeVersion = int.Parse(temoNode.Attributes[0].Value);
  56. if (nativeVersion != version)
  57. {
  58. StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
  59. sw.Write(tempDoc2.OuterXml);
  60. sw.Close();
  61. _PlayerDoc = tempDoc2;
  62. }
  63. else
  64. {
  65. _PlayerDoc = tempDoc1;
  66. }
  67. }
  68. }
  69. else
  70. {
  71. TextAsset textAsset = Bundle.Config.LoadAsset<TextAsset>("PlayerConfig");
  72. tempDoc2 = new XmlDocument();
  73. tempDoc2.LoadXml(textAsset.text);
  74. StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
  75. sw.Write(tempDoc2.OuterXml);
  76. sw.Close();
  77. _PlayerDoc = tempDoc2;
  78. _PlayerDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
  79. }
  80. }
  81. return _PlayerDoc;
  82. }
  83. set { _PlayerDoc = value; }
  84. }
  85. private static XmlNode _PlayerNode;
  86. private static XmlDocument _PlayerDoc;
  87. #endregion
  88. private static void SaveSkillList()
  89. {
  90. XmlNode xmlNode;
  91. XmlAttribute xmlAttribute;
  92. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  93. xmlNode.RemoveAll();
  94. for (int i = 0; i < ManaData.SkillList.Count; i++)
  95. {
  96. if (ManaData.SkillList[i].SkillType == SkillType.Skill)
  97. {
  98. #region Skill
  99. Skill skill = (Skill)ManaData.SkillList[i];
  100. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, skill.Name, ""));
  101. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  102. xmlAttribute.Value = skill.SkillType.ToString();
  103. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  104. xmlAttribute.Value = skill.ItemStatus.ToString();
  105. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  106. xmlAttribute.Value = skill.Level.ToString();
  107. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
  108. xmlAttribute.Value = skill.CoolTimer.ToString();
  109. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
  110. xmlAttribute.Value = skill.UseTimer.ToString();
  111. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  112. #endregion
  113. }
  114. else if (ManaData.SkillList[i].SkillType == SkillType.Pack)
  115. {
  116. #region Pack
  117. Pack pack = (Pack)ManaData.SkillList[i];
  118. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "礼包", ""));
  119. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  120. xmlAttribute.Value = pack.SkillType.ToString();
  121. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Name"));
  122. xmlAttribute.Value = pack.Name;
  123. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  124. xmlAttribute.Value = pack.ItemStatus.ToString();
  125. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  126. xmlAttribute.Value = pack.Level.ToString();
  127. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  128. #endregion
  129. }
  130. else if (ManaData.SkillList[i].SkillType == SkillType.Ability)
  131. {
  132. #region Ability
  133. Ability ability = (Ability)ManaData.SkillList[i];
  134. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ability.Name, ""));
  135. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  136. xmlAttribute.Value = ability.SkillType.ToString();
  137. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  138. xmlAttribute.Value = ability.ItemStatus.ToString();
  139. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  140. xmlAttribute.Value = ability.Level.ToString();
  141. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  142. #endregion
  143. }
  144. else if (ManaData.SkillList[i].SkillType == SkillType.BigSkill)
  145. {
  146. #region BigSkill
  147. BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
  148. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, bigSkill.Name, ""));
  149. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  150. xmlAttribute.Value = bigSkill.SkillType.ToString();
  151. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  152. xmlAttribute.Value = bigSkill.ItemStatus.ToString();
  153. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("BarStatus"));
  154. xmlAttribute.Value = bigSkill.BarStatus.ToString();
  155. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  156. xmlAttribute.Value = bigSkill.Level.ToString();
  157. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
  158. xmlAttribute.Value = bigSkill.CoolTimer.ToString();
  159. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
  160. xmlAttribute.Value = bigSkill.UseTimer.ToString();
  161. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  162. #endregion
  163. }
  164. }
  165. }
  166. private static void SavePlantList()
  167. {
  168. XmlAttributeCollection attributes = PlayerNode.SelectSingleNode("PlantList").Attributes;
  169. attributes.RemoveAll();
  170. for (int i = 0; i < ManaGarden.PlantList.Count; i++)
  171. {
  172. attributes.Append(PlayerDoc.CreateAttribute(ManaGarden.PlantList[i].name));
  173. attributes[i].Value = (ManaGarden.PlantList[i].Flower.FlowerInfo.Id - 1).ToString();
  174. }
  175. }
  176. private static void SaveCommon()
  177. {
  178. PlayerNode.SelectSingleNode("Sign").Attributes[0].Value = ManaData.Sign.ToString();
  179. PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = ManaData.Coin.ToString("0");
  180. PlayerNode.SelectSingleNode("Level").Attributes[0].Value = ManaData.Level.ToString();
  181. PlayerNode.SelectSingleNode("Person").Attributes[0].Value = ManaData.Person.ToString();
  182. PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value = ManaData.Diamond.ToString();
  183. PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
  184. PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = ManaData.CoinPerson.ToString();
  185. PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = ManaData.MiniTimer.ToString();
  186. PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = ManaData.CircleTimer.ToString();
  187. PlayerNode.SelectSingleNode("MiniGameAmt").Attributes[0].Value = ManaMiniGame.MiniGameAmt.ToString();
  188. }
  189. private static void SaveFlowerList()
  190. {
  191. XmlAttributeCollection attributes = PlayerNode.SelectSingleNode("FlowerList").Attributes;
  192. attributes[0].RemoveAll();
  193. XmlAttribute xmlAttribute = attributes.Append(PlayerDoc.CreateAttribute("ID"));
  194. for (int i = 0; i < ManaGarden.FlowerInfoList.Count; i++)
  195. {
  196. if (ManaGarden.FlowerInfoList[i].Unlock)
  197. {
  198. xmlAttribute.Value += ManaGarden.FlowerInfoList[i].Id - 1 + " ";
  199. }
  200. }
  201. xmlAttribute.Value = xmlAttribute.Value.Trim(' ');
  202. }
  203. public static void SavePlayerConfig()
  204. {
  205. SaveSkillList();
  206. SavePlantList();
  207. SaveCommon();
  208. SaveFlowerList();
  209. StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
  210. sw.Write(PlayerDoc.OuterXml);
  211. sw.Close();
  212. }
  213. private static void ResetSkillList()
  214. {
  215. XmlNode xmlNode;
  216. XmlAttribute xmlAttribute;
  217. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  218. xmlNode.RemoveAll();
  219. for (int i = 0; i < ManaData.SkillList.Count; i++)
  220. {
  221. if (ManaData.SkillList[i].SkillType == SkillType.Skill)
  222. {
  223. #region Skill
  224. Skill skill = (Skill)ManaData.SkillList[i];
  225. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, skill.Name, ""));
  226. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  227. xmlAttribute.Value = skill.SkillType.ToString();
  228. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  229. xmlAttribute.Value = SkillStatus.Lock.ToString();
  230. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  231. xmlAttribute.Value = 0.ToString();
  232. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
  233. xmlAttribute.Value = 0.ToString();
  234. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
  235. xmlAttribute.Value = 0.ToString();
  236. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  237. #endregion
  238. }
  239. else if (ManaData.SkillList[i].SkillType == SkillType.Pack)
  240. {
  241. #region Pack
  242. Pack pack = (Pack)ManaData.SkillList[i];
  243. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "礼包", ""));
  244. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  245. xmlAttribute.Value = pack.SkillType.ToString();
  246. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Name"));
  247. xmlAttribute.Value = pack.Name;
  248. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  249. xmlAttribute.Value = SkillStatus.Lock.ToString();
  250. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  251. xmlAttribute.Value = 0.ToString();
  252. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  253. #endregion
  254. }
  255. else if (ManaData.SkillList[i].SkillType == SkillType.Ability)
  256. {
  257. #region Ability
  258. Ability ability = (Ability)ManaData.SkillList[i];
  259. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ability.Name, ""));
  260. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  261. xmlAttribute.Value = ability.SkillType.ToString();
  262. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  263. xmlAttribute.Value = SkillStatus.Lock.ToString();
  264. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  265. xmlAttribute.Value = 0.ToString();
  266. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  267. #endregion
  268. }
  269. else if (ManaData.SkillList[i].SkillType == SkillType.BigSkill)
  270. {
  271. #region BigSkill
  272. BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
  273. xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, bigSkill.Name, ""));
  274. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
  275. xmlAttribute.Value = bigSkill.SkillType.ToString();
  276. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
  277. xmlAttribute.Value = SkillStatus.Lock.ToString();
  278. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("BarStatus"));
  279. xmlAttribute.Value = SkillStatus.Buy.ToString();
  280. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
  281. xmlAttribute.Value = 0.ToString();
  282. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
  283. xmlAttribute.Value = 0.ToString();
  284. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
  285. xmlAttribute.Value = 0.ToString();
  286. xmlNode = PlayerNode.SelectSingleNode("SkillList");
  287. #endregion
  288. }
  289. }
  290. }
  291. private static void ResetPlantList()
  292. {
  293. XmlNode xmlNode = PlayerNode.SelectSingleNode("PlantList");
  294. xmlNode.RemoveAll();
  295. XmlAttribute xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA1"));
  296. xmlAttribute.Value = 0.ToString();
  297. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA2"));
  298. xmlAttribute.Value = 1.ToString();
  299. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA3"));
  300. xmlAttribute.Value = 2.ToString();
  301. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA4"));
  302. xmlAttribute.Value = 3.ToString();
  303. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA5"));
  304. xmlAttribute.Value = 4.ToString();
  305. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA6"));
  306. xmlAttribute.Value = 5.ToString();
  307. xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA7"));
  308. xmlAttribute.Value = 6.ToString();
  309. }
  310. private static void ResetCommon()
  311. {
  312. PlayerNode.SelectSingleNode("Slot").Attributes[0].Value = "7";
  313. PlayerNode.SelectSingleNode("Sign").Attributes[0].Value = "0";
  314. PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = "0";
  315. PlayerNode.SelectSingleNode("Level").Attributes[0].Value = "0";
  316. PlayerNode.SelectSingleNode("Person").Attributes[0].Value = "0";
  317. PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value = "0";
  318. PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
  319. PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = "0";
  320. PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = "0";
  321. PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "10";
  322. PlayerNode.SelectSingleNode("MiniGameAmt").Attributes[0].Value = "0";
  323. }
  324. private static void ResetFlowerList()
  325. {
  326. XmlAttributeCollection attributes = PlayerNode.SelectSingleNode("FlowerList").Attributes;
  327. attributes[0].RemoveAll();
  328. XmlAttribute xmlAttribute = attributes.Append(PlayerDoc.CreateAttribute("ID"));
  329. xmlAttribute.Value = "0 1 2 3 4 5 6 7 8 9";
  330. }
  331. public static void ResetPlayerConfig()
  332. {
  333. ResetSkillList();
  334. ResetPlantList();
  335. ResetCommon();
  336. ResetFlowerList();
  337. StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
  338. sw.Write(PlayerDoc.OuterXml);
  339. sw.Close();
  340. }
  341. public static XmlAttributeCollection GetAwardConfig()
  342. {
  343. TextAsset textAsset;
  344. XmlDocument xmlDoc = new XmlDocument();
  345. textAsset = Bundle.Config.LoadAsset<TextAsset>("award_config");
  346. xmlDoc.LoadXml(textAsset.text);
  347. XmlNode xmlNode = xmlDoc.SelectSingleNode("data").SelectSingleNode("item");
  348. return xmlNode.Attributes;
  349. }
  350. public static List<XmlAttributeCollection> GetSkillConfig()
  351. {
  352. TextAsset textAsset;
  353. XmlDocument xmlDoc = new XmlDocument();
  354. List<XmlNodeList> xmlNodeLists = new List<XmlNodeList>();
  355. List<XmlAttributeCollection> attributesList = new List<XmlAttributeCollection>();
  356. textAsset = Bundle.Config.LoadAsset<TextAsset>("pack_config");
  357. xmlDoc.LoadXml(textAsset.text);
  358. xmlNodeLists.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
  359. textAsset = Bundle.Config.LoadAsset<TextAsset>("skill_config");
  360. xmlDoc.LoadXml(textAsset.text);
  361. xmlNodeLists.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
  362. textAsset = Bundle.Config.LoadAsset<TextAsset>("ability_config");
  363. xmlDoc.LoadXml(textAsset.text);
  364. xmlNodeLists.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
  365. for (int i = 0; i < xmlNodeLists.Count; i++)
  366. {
  367. for (int j = 0; j < xmlNodeLists[i].Count; j++)
  368. {
  369. attributesList.Add(xmlNodeLists[i][j].Attributes);
  370. }
  371. }
  372. return attributesList;
  373. }
  374. public static List<XmlAttributeCollection> GetSignConfig()
  375. {
  376. TextAsset textAsset;
  377. XmlNodeList xmlNodeList;
  378. XmlDocument xmlDoc = new XmlDocument();
  379. List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
  380. textAsset = Bundle.Config.LoadAsset<TextAsset>("signin_config");
  381. xmlDoc.LoadXml(textAsset.text);
  382. xmlNodeList = xmlDoc.SelectSingleNode("data").SelectNodes("item");
  383. for (int i = 0; i < xmlNodeList.Count; i++)
  384. {
  385. attributeList.Add(xmlNodeList[i].Attributes);
  386. }
  387. return attributeList;
  388. }
  389. public static List<XmlAttributeCollection> GetFlowerConfig()
  390. {
  391. TextAsset textAsset;
  392. XmlNodeList xmlNodeList;
  393. XmlDocument xmlDoc = new XmlDocument();
  394. List<XmlAttributeCollection> attributesList = new List<XmlAttributeCollection>();
  395. textAsset = Bundle.Config.LoadAsset<TextAsset>("flower_config");
  396. xmlDoc.LoadXml(textAsset.text);
  397. xmlNodeList = xmlDoc.SelectSingleNode("data").SelectNodes("item");
  398. for (int i = 0; i < xmlNodeList.Count; i++)
  399. {
  400. attributesList.Add(xmlNodeList[i].Attributes);
  401. }
  402. return attributesList;
  403. }
  404. }