Теперь можно получать полный путь к полю по номеру из структуры GROUP.
И это ключ к парсингу XML с одинаковыми именами тегов.
Код: Выделить всё
! Получить полный путь к полю структуры данных (без массивов)
AntiWhere Procedure(*Group gGroup,Long lColumn) !,String
xParentField Any
xIndex Long(1)
xFieldName CString(101)
xGrRef &Group
xGrCol Long(1)
Code
xParentField = ''
Loop
If Who( gGroup,xIndex) = '' then Break ! Закончились поля
elsIf IsGroup(gGroup,xIndex) ! Группа
xGrRef &= GetGroup(gGroup,xIndex)
xGrCol = 1
Loop
If Who(xGrRef,xGrCol) = '' then Break
elsIf (xIndex + xGrCol) = lColumn ! Поле входит в группу
xParentField = xParentField & Choose(xParentField = '','','/') & Lower(Who(gGroup,xIndex))
Break
end
xGrCol += 1
end
end
xIndex += 1
If xIndex = lColumn then Break.
end
Return xParentField & Choose(xParentField = '','','/') & Lower(Who(gGroup,lColumn))