Buenas, estoy tratando de manipular un contenido de una respueta xml de un webservice, estoy usando los componentes nativexml alli me dan un ejemplo de manipular un archivo xml, pero yo tengo el contenido en una variable string y no se como podria manipularlos aca le dejo el codigo
Código Delphi
[-]var
i, j: Integer;
AXmlDocument: TNativeXml;
resultado:string;
begin
resultado:=edt1.Text;
txt1.Lines.Clear;
AXmlDocument := TNativeXml.Create;
try
AXmlDocument.OnNodeLoaded:resultado;
if assigned(AXmlDocument.Root) then with AXmlDocument.Root do
for i := 0 to NodeCount - 1 do begin
txt1.Lines.Add(Nodes[i].Name);
for j := 0 to Nodes[i].NodeCount - 1 do
txt1.Lines.Add(' ' + Nodes[i].Nodes[j].Name);
end;
finally
AXmlDocument.Free;
end;