TinyXmlReaderWeb

Author: Berenger

Remark
That script is an extension of http://www.unifycommunity.com/wiki/index.php?title=TinyXmlReader.

Description
OP's description :

"You can use Mono's System.Xml for handling XML files but this requires including the System.Xml dll into your Unity program which increases its file size by about 1 MB. Not to mention the lack of documentation for using System.Xml on UnityScript.

I found rolling my own XML parser was easier. Note however that this is a really simple XML parser, it doesn't recognize attributes (I did not implement it simply because I don't use XML attributes). "

This extension's purpose is to be used with the web player. Basically, the main difference is the way the xml string is obtained, with www instead of System.IO.

Usage
Once the file was loaded and parsed, you can access the result array, a hashtable or custom class FromXML (see comments). The data is stored as follow, with i an even integer :

* xml.strResult[i] => tag * xml.strResult[i+1] => content

* xml.hashtableResult[ key ] => content

* xml.fromXmlResult[i].sVal => content as string * xml.fromXmlResult[i].iVal => content as int * xml.fromXmlResult[i].bVal => content as bool