Sign in Join
FPDoc Onlineexperiment

WriteXMLFile procedure

In unit Laz_XMLWrite

Writes an XML document to a file, text file, or stream.

Declaration

pascal
procedure WriteXMLFile(doc: TXMLDocument; const AFileName: string)
 ; overload

Description

WriteXMLFile is an overloaded procedure used to write an XML document to a file, text file, or stream. Overloaded variants provide the implementation details for each of the destinations, and create either TTextXMLWriter or TStreamXMLWriter class instances to store the XML document.

AFileName indicates the file name on the local file system where the XML content is stored. AFileName can contain UTF-8 encoded values, and must represent a valid file name. If the file in AFileName already exists, an exception will be raised.

Flags contains values from the TXMLWriterFlag enumeration. Use Flags to enable XML writing options in the routine. The default value for the argument is an empty set ([]), and indicates that no options are enabled in the routine. Please note that use of TXMLWriterFlag options like xwfAllowNullCharsInAttributeValue and xwfSpecialCharsInAttributeValue can result in an XML document that cannot be handled by a validating XML processor. The ReadXMLFile routine in LazUtils will accept and handle the values.

This description is the one of Laz2_XMLWrite.WriteXMLFile.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.