I see two lines which definitely will not work:
1.)
{$I unit1.lrs}
Delphi form resources are not included in that way. You have to write:
{$R *.dfm}
Of course this requires a Delphi
DFM file which contains the
GUI elements of the Form corresponding to the
Unit (
Unit.dfm) to be present. As far as I know Delphi is not able to load those Lazarus resource files.
2.)
.ChildNodes.Item[0].AppendChild(parentNode); // insert a childnode in respective parent node
This is a syntax error. There must be a suitable object instance before the dot "." at the beginning of the line.