[Overview][Types][Procedures and functions][Index] Reference for unit 'Laz2_XMLWrite' (#lazutils)

WriteXML

Writes a DOM Node to a file, text file, or stream.

Declaration

Source position: laz2_xmlwrite.pas line 42

procedure WriteXML(

  Element: TDOMNode;

  const AFileName: string;

  Flags: TXMLWriterFlags = []

); overload;

procedure WriteXML(

  Element: TDOMNode;

  var AFile: Text;

  Flags: TXMLWriterFlags = []

); overload;

procedure WriteXML(

  Element: TDOMNode;

  AStream: TStream;

  Flags: TXMLWriterFlags = []

); overload;

Arguments

Element

  

DOM Node with the XML content written in the method.

AFileName

  

File name where the XML content is stored.

Flags

  

Options enabled when writing the XML content.

Arguments

Element

  

DOM Node with the XML content written in the method.

AFile

  

Text file type where the content is written.

Flags

  

Options enabled when writing the XML content.

Arguments

Element

  

DOM Node with the XML content written in the method.

AStream

  

Stream where the XML document is stored.

Flags

  

Options enabled when writing the XML content.

Description

WriteXML is an overloaded procedure used to write a DOM Node to a file, text file, or stream. WriteXML calls one of the overloaded WriteXMLFile routines for a specific destination.

Element is a TDOMNode parameter that represents the DOM Document Node with the XML content written in the method. WriteXML ensures that Element is cast to a TXMLDocument type when calling the WriteXMLFile routine.

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.

See also

WriteXMLFile

  

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


Version 3.2 Generated 2024-02-25 Home