Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i := 0 to oldLine.MaxCounter - 1 do
- begin
- commentDefaultOld := oldDefaultLine.AntGetListWithTypes(i, [msTutorBefore]);
- commentOld := oldLine.AntGetListWithTypes(i, [msTutorBefore]);
- for j := 0 to Length(commentOld) - 1 do
- begin
- Res := ReadXMLTreeFromUnicodeString(CommentOld[j].TextValue);
- ResDefault := ReadXMLTreeFromUnicodeString(CommentDefaultOld[j].TextValue);
- if not Res.Success then Continue;
- question := Res.Root.Values['goal'];
- if (Res.Root.TagName = 'question') or (Res.Root.TagName = 'start') and (Pos('%', question) = 0) and (Pos('>', question) = 0) then
- begin
- for k := 0 to storLine.MaxCounter - 1 do
- begin
- commentNew := storLine.AntGetListWithTypes(k, [msTutorBefore]);
- for l := 0 to Length(commentNew) - 1 do
- begin
- ResNew := ReadXMLTreeFromUnicodeString(CommentNew[l].TextValue);
- if not ResNew.Success then
- Continue;
- if Res.Root.TagName = 'question' then
- begin
- if ResNew.Root.TagName = 'question' then
- begin
- if (ResNew.Root.Children[0].Values['val'] = ResDefault.Root.Children[0].Values['val']) and (ResNew.Root.Children[1].Values['value'] = ResDefault.Root.Children[1].Values['value']) then
- begin
- storLine.AntDeleteTypeRecord(k, l+1, msTutorBefore);
- storLine.AntInsertText(k, l+1, msTutorBefore, WriteXMLToUnicodeString(Res.Root));
- end;
- end;
- end;
- if Res.Root.TagName = 'start' then
- begin
- if ResNew.Root.TagName = 'start' then
- begin
- if (ResNew.Root.Values['goal'] = ResDefault.Root.Values['goal']) then
- begin
- storLine.AntDeleteTypeRecord(k, l+1, msTutorBefore);
- storLine.AntInsertText(k, l+1, msTutorBefore, WriteXMLToUnicodeString(Res.Root));
- end;
- end;
- end;
- ResNew.Root.Free;
- end;
- end;
- end;
- Res.Root.Free;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement