Hello I made this function which allows me to create a document from the selected object in a geckobowser:
function TForm6.creer_doc(node:nsIDOMNode):nsIDOMDocument;
var
Next: nsIDOMNode;
nName: IInterfacedString;
TN: TTreeNode;
begin
node:=GeckoBrowser1.ContentWindow.GetSelection.GetRangeAt(0).StartContainer;
if not Assigned(node) then exit;
nName:=NewString;
Next:=node;
while Assigned(Next) do
begin
Fdoc.DocumentElement.AppendChild(Next);
if Next.HasChildNodes then
begin
creer_doc(Next.FirstChild);
end;
Next:=Next.NextSibling;
end;
Result:=Fdoc;
end;
But apparently I have nothing in my paper Fdoc.Merci help me to create a nsIDOMDocument.