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

IsXmlName

Determines if the specified value contains a valid XML element name.

Declaration

Source position: laz2_xmlutils.pas line 32

function IsXmlName(

  const Value: TXMLUtilString;

  Xml11: Boolean = False

):Boolean; overload;

function IsXmlName(

  Value: PXMLUtilChar;

  Len: Integer;

  Xml11: Boolean = False

):Boolean; overload;

Arguments

Value

  

Value examined in the routine.

Xml11

  

True when XML 1.1 naming conventions used in the document.

Function result

True when the value is a valid XML element name.

Arguments

Value

  

Value examined in the routine.

Len

  

Number of characters in the Pointer.

Xml11

  

True when XML 1.1 naming conventions used in the document.

Description

IsXmlName is an overloaded Boolean function used to determine if Value contains a valid XML element name. It ensures that the name is valid using the Name production in the XML specifications.

In XML 1.0, the valid characters allowed in a name was restricted. It used the principle of "that which is not expressly permitted is prohibited."

The Xml11 flag indicates if the XML 1.1 element naming conventions are allowed. When set to True, the XML 1.1 naming conventions are used. XML 1.1 allows almost all Unicode characters in any position in the name except the NameStart character. When to False (the default value), XML 1.0 naming conventions are used.

Extensible Markup Language (XML) 1.0 (Fifth Edition)Names and Tokens

Extensible Markup Language (XML) 1.1 (Second Edition)Names and Tokens

The overloaded variants allow Value to be specified as a TXMLUtilString (AnsiString) or a PXMLUtilChar (PChar) type.

The return value is True when Value is a valid XML element name for the indicated specification level.


Version 4.0 Generated 2025-05-03 Home