Hello i trying to get value from nested tag name and i want to save the value the way that i can refer back easy. i have no ideas how should i write.
what i want is example: “aeroplan” will have suggest of “aeroplane”,“aeroplane” and “aerobian”
public void GetSuggestionOption()
{
XmlDocument findSuggestionDoc = new XmlDocument();
findSuggestionDoc.Load (Application.dataPath+ "/" + filename);
XmlNodeList suggestionOptionList = findSuggestionDoc.GetElementsByTagName("suggestions");
XmlDocument findOptionDoc = new XmlDocument();
findOptionDoc.Load (Application.dataPath+ "/" + filename);
XmlNodeList optionSuggestionList = findOptionDoc.GetElementsByTagName("option");
for (int i=0; i < suggestionOptionList.Count; i++)
{
suggestionList.Add(suggestionOptionList[i].InnerXml);
Debug.Log("Suggest:"+(i+ 1) + suggestionOptionList[i].InnerXml);
for (int j=0; j < optionSuggestionList.Count; j++)
{
optionList.Add(optionSuggestionList[j].InnerXml);
Debug.Log("Suggest:"+(i+ 1) +" Option:" +(j+ 1) + " " + optionSuggestionList[j].InnerXml);
}
}
}