function AttributeBooleanDef(const AttrName: string; const DefaultValue: boolean): boolean;
Description
Methods
function AttributeString(const AttrName: string; var Value: string): boolean;
Read from Element attribute value and returns True, or (of there is no such attribute) returns False and does not modify Value. Value is a "var", not "out" param, because in the latter case it's guaranteed that the old Value will not be cleared.
function AttributeURL(const AttrName: string; const BaseUrl: string; var URL: string): boolean;
Read from Element attribute value as URL and returns True, or (of there is no such attribute) returns False and does not modify Value.
Returned URL is always absolute. The value in file may be a relative URL, it is resolved with respect to BaseUrl, that must be absolute.
function AttributeCardinal(const AttrName: string; var Value: Cardinal): boolean;
Read from Element attribute value as Cardinal and returns True, or (of there is no such attribute) returns False and does not modify Value.
function AttributeInteger(const AttrName: string; var Value: Integer): boolean;
Read from Element attribute value as Integer and returns True, or (of there is no such attribute) returns False and does not modify Value.
function AttributeSingle(const AttrName: string; var Value: Single): boolean;
Read from Element attribute value as Single and returns True, or (of there is no such attribute) returns False and does not modify Value.
function AttributeFloat(const AttrName: string; var Value: Float): boolean;
Read from Element attribute value as Float and returns True, or (of there is no such attribute) returns False and does not modify Value.
function AttributeBoolean(const AttrName: string; var Value: boolean): boolean;
Read from Element attribute value as Boolean and returns True, or (of there is no such attribute) returns False and does not modify Value.
A boolean value is interpreted just like FPC's TXMLConfig objects: true is designated by word true, false by word false, case is ignored. If attribute exists but it's value is not true or false, then returns False and doesn't modify Value paramater. So behaves just like the attribute didn't exist.
function AttributeString(const AttrName: string): string;
Retrieves from Element given attribute as a string, raises EDOMAttributeMissing if missing.
function AttributeURL(const AttrName: string; const BaseUrl: string): string;
Retrieves from Element given attribute as an absolute URL, raises EDOMAttributeMissing if missing. Returned URL is always absolute. The value in file may be a relative URL, it is resolved with respect to BaseUrl, that must be absolute.
function AttributeBoolean(const AttrName: string): boolean;
Retrieves from Element given attribute as a boolean, raises EDOMAttributeMissing if missing or has invalid value. A boolean value is interpreted just like FPC's TXMLConfig objects: true is designated by word true, false by word false, case is ignored.
If attribute exists but it's value is not true or false, then raises EDOMAttributeMissing. So behaves just like the attribute didn't exist.