attribute
Creates an attribute delegate for an XML element property.
This function creates a delegate that can be used to access and modify attributes on an XML element using properties. The delegate ensures type safety and provides null-safety checks for required attributes. This variant assumes the attribute value doesn't require any transformation and directly uses the raw value.
Return
An AttributeDelegate instance for the specified types.
Parameters
The type of the attribute value (reified).
An optional custom name for the attribute (defaults to the property name).
An optional namespace for the attribute.
Throws
if a required attribute (non-nullable TAttribute) is not found on the XML element.
Creates an attribute delegate for an XML element property.
This function creates a delegate that can be used to access and modify attributes on an XML element using properties. The delegate ensures type safety and provides null-safety checks for required attributes.
Return
An AttributeDelegate instance for the specified types.
Parameters
The type of the attribute value before transformation (reified).
The type of the attribute value after transformation (reified).
An optional custom name for the attribute (defaults to the property name).
An optional namespace for the attribute.
A transformation function applied to the raw attribute value before returning.
Throws
if a required attribute (non-nullable TAttribute) is not found on the XML element.