Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses
- OXmlPDOM;
- procedure TForm1.SubmitButtonClick(Sender: TObject);
- var
- XMLNode: PXMLNode;
- XMLDocument: IXMLDocument;
- begin
- XMLDocument := CreateXMLDoc;
- XMLDocument.LoadFromFile('C:\File.xml');
- if XMLDocument.DocumentElement.SelectNode('//categories', XMLNode) then
- begin
- XMLNode := XMLNode.AddChild('cat1');
- XMLNode.Text := Edit1.Text;
- XMLDocument.SaveToFile('C:\File.xml');
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment