Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

XmlTextReader is it still supported

Discussion in 'UGUI & TextMesh Pro' started by rimawi, Aug 28, 2014.

  1. rimawi

    rimawi

    Joined:
    Mar 5, 2011
    Posts:
    34
    When I try the code below in 4.6 i get : Assets/SCRIPTS/puzzleScript.js(4,16): BCE0018: The name 'XmlTextReader' does not denote a valid type ('not found').
    Code (JavaScript):
    1. var asset:TextAsset = Resources.Load("q1");
    2. if(asset != null)
    3. {
    4.     var reader:XmlTextReader = new XmlTextReader(new StringReader(asset.text));
    5.     while(reader.Read())
    6.     {
    7.         if(reader.Name == "item1")
    8.         {
    9.             Debug.Log(reader.Name + " label = " + reader.GetAttribute("label"));
    10.         }
    11.     }
    12. }
    Thanks