

You can access the Vendor implementation or even better in the case of MSXML the Microsoft ActiveX objects directly: If you care about speed forget about TXMLDocument. The created TInterfaced objects also need to be destroyed when you release your XML Node. The same two-level indirection applies to all XML objects (attributes, Children) and cause a huge degradation of performance. Any call/property access to IXMLNode translates in a call of IDOMNode which then calls IXMLDOMNode. IXMLDOMNode is defined in Winapi.msxml.Īs a result when you create any IXMLNode, a TXMLNode is created and this creates a TMSDOMNode which points to an IXMLDOMNode. TMSDOMNode (also a TInterfacedObject) wraps IXMLDOMNode stored in a private field FMSNode. The IDOMNode is implemented by the used vendor in this case by a class TMSDOMNode TXMLNode wraps an IDOMNode stored in a private field FDOMNode. Node is an IXMLInterface implemented by TXMLNode (TInterfacedObject defined in Xml.XmlDoc). Create ( nil ) var Node : IXMLNode := Doc. Your create an XML document and you access the top node: (or you simply include the implementation unit in your uses clause). Say you want to use MSXML and you specify 'MSXML' as your DefaultDomVendor. However there is a big catch: PERFORMANCE. The most common way of accessing XML is through TXMLDocument/IXMLDocument. Multiple implementations including (MSXML, OmniXML, OpenXML and more)Ībility to plug in your own implementation Support for the standard DOM interfaces (Xml.XmlDom)

You have TXMLDocument/IXMLDocument offering high-level support (Xml.xmldoc) I got involved in XML parsing, since SVG files are in XML format.Īt the surface the XML support in Delphi is very good: Now is a bit passé with JSON, YAML etc being "in". XML used to be considered the universal data format.
