Function FindOccurs()Function FindOccurs(tmpArr) AsLong‘查找OCCURS所在的下标 Dim pos AsLong pos =0 For i =0ToUBound(tmpArr) If tmpArr(i) ="OCCURS"Then pos = i Next i FindOccurs = pos End Function Function FindDiffLevel()Function FindDiffLevel(startIndex, occLevel)’查找从STARTINDEX开始,层数与STARTINDEX中不一样的层的下标 Dim flag AsBoolean flag =False i = startIndex DoWhile flag =False tmpArr = varData(i) If tmpArr(0) = occLevel Then flag =True i = i -2 EndIf If i = varData.Count Then flag =True i