I’m planning to add XML support to application, but I’m not familiar with XML programming in Delphi. Basically I need to create objects based on XML nodes and generate XML file based on objects.
Which XML component library I should use? Are there any good tutorials for XML with Delphi?
You can start by looking at Delphi’s TXMLDocument component. This will provide you with the basics of working with XML/DOM. It’s simple and can be added by dropping it onto your Form. It has LoadFromFile and SaveToFile methods and is easily navigated.
However, at some point you will exhaust TXMLDocument’s features, especially if you want to work with things like XPath.
I suggest you look at IXMLDOMDocument2 which is part of MSXML2_TLB, e.g.
You will need to add msxmldom, xmldom, XMLIntf, XMLDoc & MSXML2_TLB to your uses section.
There are a few component libraries out there but I would suggest writing your own helper class or functions. Here’s an example of one we wrote and use:
Take it from there.