Xml.XMLDoc.TXMLDocument.FileName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property FileName: DOMString read GetFileName write SetFileName;

C++

__property System::UnicodeString FileName = {read=GetFileName, write=SetFileName};

Properties

Type Visibility Source Unit Parent
property published
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLDocument

Description

Specifies the file name for the XML document associated with this TXMLDocument object.

Set FileName to specify the XML document you want to examine or manipulate using the TXMLDocument object. Once you have set FileName to the name of an XML document, you can activate the XML document and examine or manipulate it using the DocumentElement property.

When you set the value of FileName, the XML property automatically changes (at runtime) to represent the contents of that file.

Note: Setting the value of FileName automatically sets the Active property to false.

After activating the XML document, any changes you make to the document are not saved back to disk until you call the SaveToFile method.

Tip: If the underlying DOM implementation supports it, you can use FileName to specify an URL rather than a file on disk.

See Also