- Home /
How To Switch A XmlNodeList To A String
So I am currently trying to find a game objects tag through the data I am extracting from my XML. But GameObject.FindGameObjectsWithTag
does not take in XMLNodeList, so I am trying to convert the XMLNodeList Data to a string. But I am really new to C# and how it works with XML so I am pretty confused on how to go about this since simply creating a String and setting it equal to the XMLNodeList does not work, I'm really not to sure how to go about it. Here's where I'm extracting the XML, not sure if this would help explain on how I should go about it.
XmlDocument newXml = new XmlDocument ();
newXml.Load(Application.dataPath + "/Script/keno.xml");
print ("xml loaded");
XmlDocument xmlDoc = new XmlDocument();
numList = xmlDoc.GetElementsByTagName("KenoNumbers/numbers");
print (numList[0]);
Answer by Thewhiteaura · May 26, 2015 at 02:02 PM
I haven't looked too much into this topic as of yet, but I came across a couple of links that i saved for reference while figuring out php, I hope these can be of help to you.
-Here is generating an xml file, which it seems you have already done, although this is through php- http://stackoverflow.com/questions/486757/how-to-generate-xml-file-dynamically-using-php
-And here is read string as xml to show list-
http://answers.unity3d.com/questions/273324/read-string-as-xml-to-show-list.html
Thanks for the help! But that didn't really help me solve the issue, much appreciated though!