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

ReadXMLFragment

Reads an XML fragment into the specified DOM Node.

Declaration

Source position: laz2_xmlread.pas line 64

procedure ReadXMLFragment(

  AParentNode: TDOMNode;

  const AFilename: string;

  Flags: TXMLReaderFlags = []

); overload;

procedure ReadXMLFragment(

  AParentNode: TDOMNode;

  var f: Text;

  Flags: TXMLReaderFlags = []

); overload;

procedure ReadXMLFragment(

  AParentNode: TDOMNode;

  var f: file;

  Flags: TXMLReaderFlags = []

); overload;

procedure ReadXMLFragment(

  AParentNode: TDOMNode;

  f: TStream;

  Flags: TXMLReaderFlags = []

); overload;

procedure ReadXMLFragment(

  AParentNode: TDOMNode;

  f: TStream;

  const ABaseURI: string;

  Flags: TXMLReaderFlags = []

); overload;

Arguments

AParentNode

  

DOM Node used as the parent for the XML fragment.

AFilename

  

File name with the XML content read in the routine.

Flags

  

Options enabled while reading XML content.

Arguments

AParentNode

  

DOM Node used as the parent for the XML fragment.

f

  

Stream with the XML content read in the routine.

Flags

  

Options enabled while reading XML content.

Arguments

AParentNode

  

DOM Node used as the parent for the XML fragment.

f

  

Stream with the XML content read in the routine.

Flags

  

Options enabled while reading XML content.

Arguments

AParentNode

  

DOM Node used as the parent for the XML fragment.

f

  

Stream with the XML content read in the routine.

Flags

  

Options enabled while reading XML content.

Arguments

AParentNode

  

DOM Node used as the parent for the XML fragment.

f

  

Stream with the XML content read in the routine.

ABaseURI

  

Base URI for XML content read in the routine.

Flags

  

Options enabled while reading XML content.

Description

ReadXMLFragment is an overloaded procedure used to read an XML Document Fragment from the specified input source. Overloaded variants are provided that use a file name, a File type, a Text type, or a stream as the input source for the routine. Values read in the method are stored as children in the DOM Node specified in AParentNode.

When using the variant that specifies AFileName, the parameter must represent a valid file name. An exception is raised if AFileName does not exist on the local file system. The value in AFileName is converted to a File URI and used as the BaseURI in the XML Document.

The Flags parameter contains TXMLReaderFlag values enabled in the routine. The default value for the parameter is an empty set ([]), and indicates that no options are enabled by default. Values in the Flags parameter control the behavior enabled when XML content is de-serialized.

ReadXMLFragment creates a TXMLReader instance that is used to read, parse, and store the values from the XML input source using its ProcessFragment method.

See also

TXMLReaderFlag

  

Represents options enabled when reading XML content.

TDOMNode

  

Implements the DOM Node interface.


Version 3.2 Generated 2024-02-25 Home