try
xmlSource.load('source.xml');
memoSource.Text := xmlSource.xml;
except
on e: EOleException do
memoSource.Text := e.Message;
end;
try
xmlStylesheet.load('stylesheet.xsl');
memoStylesheet.Text := xmlStylesheet.xml;
except
on e: EOleException do
memoStylesheet.Text := e.Message;
end;
end;
procedure TMain.pcMainChange(Sender: TObject);
begin
if pcMain.ActivePage = sheetResult then
try
memoResult.Text := xmlSource.transformNode(xmlStylesheet);
except
on e: EOleException do
memoResult.Text := e.Message;
end;
end;
{ Прочие процедуры и функции }
end.
Процесс использования нашего приложения приведен на следующих рисунках (рис. 9.4–9.6).
Рис. 9.4. Входящий документ