2014年8月28日 星期四

[Unity][C#]2 simple ways of load the data form XML // 兩種簡便讀取XML資料的方法

假如今天要讀取路徑為Resources/test.xml 的XML, 內容如下:
For example, the XML data we want read as below, the path is "Resources/test.xml":

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ROOT>
<table wave="1" level="1" name="aaa"/>
<table wave="2" level="1" name="bbb"/>
</ROOT>

我們有兩種簡便讀取的方法:
We have 2 simple ways can use: