begin
ChainTexts := TStringlist.Create;
ResultStrings := TStringlist.Create;
ChainList := CoDOMDocument.create;
ChainList.Load(ORGPath + '
ProductionChain.xml');
ChainRoot := ChainList.DocumentElement;
ChainUnits := ChainRoot.childNodes;
// 128 Einträge
BuildingShortList := CoDOMDocument.create;
BuildingShortList.Load(XMLPath + '
BuildingsShort.xml');
BuildingShortRoot := BuildingShortList.DocumentElement;
BuildingShortNodes := BuildingShortRoot.childNodes;
// 207 Einträge
for I := 0
to BuildingShortNodes.Length-1
do
begin
GUID := BuildingShortNodes.item[I].attributes[0].text;
for II := 0
to Chainunits.length-1
do
begin
ChainTexts := TStringlist.Create;
ChainGUID := ChainUnits.item[II].SelectSingleNode('
Values/Standard/GUID').text;
ChainTexts.Add(ChainUnits.item[II].XML);
for III:= 0
to ChainTexts.Count -1
do
begin
if AnsiPos(
GUID, ChainTexts.Strings[III]) > 0
then ResultStrings.Add(ChainGUID + '
#' +
GUID)
end;
end;
end;
ResultStrings.SaveToFile(TMPPath + '
ChainGUIDs.txt');
end;