Hello,
I am trying desperately to get this to output anything in Unity and it is just not working…
using System;
using System.Xml;
using UnityEngine;
using UnityEngine.UI;
namespace ParseXML
{
class PARSEMATH : MonoBehaviour
{
static void Main(string[] args)
{
Debug.Log("Hello");
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("..\\..\ esting.xml");
Debug.Log("testing");
foreach (XmlNode node in xmlDoc.DocumentElement.ChildNodes)
{
string text = node.InnerText;
Console.WriteLine(node.InnerText);
Debug.Log("testing");
Debug.Log(node.InnerText);
}
}
}
}
This is the file I am using that needs to be parsed.
<mrow>
<apply>
<eq/>
<apply>
<plus/>
<apply>
<power/>
<ci>x</ci>
<cn>2</cn>
</apply>
<apply>
<times/>
<cn>4</cn>
<ci>x</ci>
</apply>
<cn>4</cn>
</apply>
<cn>0</cn>
</apply>
</mrow>