I have some doubts that this code does exactly what it should:
function TXmlDocument.GetDocumentElement: TXmlNode;
begin
if (FRoot <> nil) then
begin
Result := FRoot.FirstChild;
while (Result <> nil) do
begin
if (Result.NodeType = TXmlNodeType.Element) then
Exit;
end;
end;
Result.FNode := nil;
end;
Especially the part of it that is inside the while-loop...
I have some doubts that this code does exactly what it should:
Especially the part of it that is inside the while-loop...