我这有个列子你可以看看
var
ixml:idomdocument;
iroot,inode,inode2,ichild,ichild1,ichild2,ichild3,ichild4:string;
begin
ixml:=xmldocument1.DOMDocument;
iroot:=ixml.appendChild(ixml.createElement('CHINAEXCEL'));
inode:=iroot.appendChild(ixml.createElement('F1'));
ichild:=inode.appendChild(ixml.createElement('General'));
ichild1:=ichild.appendChild(ixml.createElement('VerMajor'));
ichild1.appendChild(ixml.createTextNode('2'));
ichild2:=ichild.appendChild(ixml.createElement('VerMinor'));
ichild2.appendChild(ixml.createTextNode('6'));
ichild3:=inode.appendChild(ixml.createElement('CellList'));
ichild4:=ichild3.appendChild(ixml.createElement('WriteByRow'));
ichild4.appendChild(ixml.createTextNode('1'));
end;