RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLDocument.Create Constructor (DOMString)

Instantiates a TXMLDocument object.

Pascal
constructor Create(AOwner: TComponent); override; overload;
constructor Create(const AFileName: DOMString); overload; reintroduce;
C++
virtual __fastcall TXMLDocument(TComponent * AOwner);
__fastcall TXMLDocument(const DOMString AFileName);

Call Create to instantiate a TXMLDocument component at runtime. You do not need to explicitly create TXMLDocument components that are added to forms or data modules at design time: they are created automatically. 

AFileName specifies the file that the new TXMLDocument instance represents. 

AOwner is another component that is responsible for freeing the TXMLDocument instance. It becomes the value of the Owner property. 

TXMLDocument components that are created at runtime without an owner are freed automatically when all references to their IXMLDocument interface are released. This differs from TXMLDocument components added to a form or data module at design time or those created with an owner. When added to a form or data module at design time, the object is explicitly freed by its Owner (the form or data module). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!