void Awake() { Assertion.AssertNotNull(sampleXml, "sampleXml"); SimpleXmlReader reader = new SimpleXmlReader(); reader.PrintXML(reader.Read(sampleXml.text), 0); }
private void Parse() { SimpleXmlReader reader = new SimpleXmlReader(); SimpleXmlNode root = reader.Read(xmlFile.text).FindFirstNodeInChildren("Variables"); for (int i = 0; i < root.Children.Count; ++i) { SimpleXmlNode child = root.Children[i]; if (ENTRY.Equals(child.TagName)) { string key = child.GetAttribute(KEY); string value = child.GetAttribute(VALUE); this.varMap[key] = value; } } }