Question: Use C# for Unity to parse a Mathml file containing the following information: ___________________________________________________________ x 2 4 x 4 0 ___________________________________________________________ The code below is
Use C# for Unity to parse a Mathml file containing the following information:
___________________________________________________________
___________________________________________________________
The code below is what I have so far but it is not completely parsing out the math equation so that I can see the equation outputted in Unity.
using System; using System.Xml; using UnityEngine; using UnityEngine.UI;
namespace ParseXML { class PARSEMATH : MonoBehaviour {
public void Start() { Debug.Log("Hello"); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load("C:\\Users\\mwilso21\\Documents\\NASA Work Unity\\MESS\\New Unity Project\\testing"); Debug.Log("testing");
//XmlDocument xmlDoc = new XmlDocument(); //TextAsset textAsset = (TextAsset)Resources.Load("testing"); //xmlDoc.LoadXml(textAsset.text);
Debug.Log("MVCFramework\\Assets\\InputXML.xml");
foreach (XmlNode node in xmlDoc.DocumentElement.ChildNodes) { string text = node.InnerText; Console.WriteLine(node.InnerText); Debug.Log("testing"); Debug.Log(node.InnerText);
} } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
