// function responsible for looping through all nodes of selected nodelist and parsing nodes to look for index of specific attribute name in component. public void readHeaderAttributes(XmlNodeList nodeList, xmlFileParser xmlFileParser2, List <string> cellNameList, ref int[] index) { if (nodeList.Count == 0) { throw new Exception("No nodes found in xml file when looking for headers"); } foreach (XmlNode node in nodeList) //for every header loaded { xmlFileParser2.getColumnHeaderIndex(node, cellNameList, ref index); } }