title: XML to TreeView in Wonderware Archestra IDE
body: <p>I'm trying to make TreeView from XML file but there is an error after validation (in bold line): &quot;not an array or indexer&quot;.</p>
  <p>dim NavBarPath as string;</p>
  <p>dim xDoc as System.Xml.XmlDocument;</p>
  <p>dim fs as System.IO.FileStream;</p>
  <p>dim xRoot as System.Xml.XmlElement;</p>
  <p>dim xnode as System.Xml.XmlNode;</p>
  <p>dim rootnode as System.Windows.Forms.TreeNode;</p>
  <p>NavBarPath = InTouch:InTAppDir + &quot;NavBar.xml&quot;;</p>
  <p>xDoc = new System.Xml.XmlDocument();</p>
  <p>fs = new System.IO.FileStream(NavBarPath, FileMode.Open, FileAccess.Read);</p>
  <p>xDoc.Load(fs);</p>
  <p>xRoot = xDoc.DocumentElement;</p>
  <p>for each xnode in xRoot</p>
  <p><strong>rootnode = new System.Windows.Forms.TreeNode(xnode.Attributes[&quot;Name&quot;].Value);</strong></p>
  <p>...</p>
  <p>next;</p>