Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TXWorld.Load;
var XMLDoc : IXMLDocument;
ANode : IXMLNode;
Index : integer;
XSector : TXSector;
begin
try
try
XMLDoc:=TXMLDocument.Create(nil);
XMLDoc.Filename:=STR_FILE_WORLDXML;
XMLDoc.Active:=True;
if (XMLDoc.DocumentElement.ChildNodes.Count > 0) then
for Index:=0 to XMLDoc.DocumentElement.ChildNodes.Count-1 do
begin
ANode := XMLDoc.DocumentElement.ChildNodes[Index];
Debug.output(Format('TXWorld.Load-> Loading Sector "%s"',[ANode.Attributes['Name']]));
XSector:=TXSector.Create(ANode.Attributes['Name']);
FSectors.Add(XSector);
// load data for this sector
XSector.Load(ANode);
end;
finally
XMLDoc:=nil; // dereference to kill the object since this is an interface
end;
except
on E: Exception do
Debug.Output(Format('TXWorld.Load-> Exception: "%s" ',[E.Message]));
end;
end;