Sign in Join
FPDoc Onlineexperiment

TDOMParseOptions.CanonicalForm property

Member of TDOMParseOptionspublicIn unit Laz2_XMLRead

Indicates whether XML Canonical Form is used for parsed XML content.

Declaration

pascal
property CanonicalForm: Boolean read GetCanonical write SetCanonical;

Description

CanonicalForm is a Boolean property which indicates whether an XML parser should convert XML content to Canonical XML form. This is also referred to as Normal form, and means that the following are used in the parsed XML document:

  • UTF-8 encoding is used.
  • An End-of-line is represented using the newline character (#10).
  • Whitespace in attribute values is normalized.
  • Entity references and non-special character references are expanded.
  • CDATA sections are replaced with their character content.
  • Empty elements are encoded as start and end element tag pairs, not using the special empty element syntax.
  • Default attributes are explicitly declared.
  • Superfluous namespace declarations are deleted.

The property value is True when all of the following properties are True:

  • CanonicalForm
  • ExpandEntities
  • CDSectionsAsText
  • Namespaces
  • PreserveWhitespace

Changing the property value to True causes the following properties to be set to True:

  • ExpandEntities
  • CDSectionsAsText
  • Namespaces
  • PreserveWhitespace

The value in CanonicalForm is used in the constructor for a TXMLReader class instance which uses an XML parser with these parse options.

See also

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