//Используй компонент TXMLDocument и документацию
//добавить все текстовые узлы узла nd.
procedure TForm1.addTextByNode(nd:IDOMNode;Memo:TMemo);
var
childlist:IDOMNodeList;
var i:integer;
begin
if nd.hasChildNodes then
begin
childlist:=nd.childNodes;
for I := 0 to childlist.length - 1 do
begin
if childlist.item[i].nodeType=3 then // тип 3= текстовый узел
begin
Memo.Lines.Add(childlist.item[i].nodeValue);
end else addTextByNode(childlist.item[i],Memo);
end;
end;
end;
//применение
list,Mainlist:IDOMNodeList;
nd:IDOMNode;
j,i:integer;
//...
Mainlist:=XMLDocument1.DOMDocument.getElementsByTagName('body');
for j:=0 to Mainlist.length-1 do
begin
nd:= Mainlist.item[j];
list:=nd.childNodes;
for i:=0 to list.length-1 do
begin
addTextByNode(list.item[i],Memo1);
end;
end;