Creates a new attribute component.
The attribute data object
Converts the attribute data to an XML-serializable object.
This method transforms the property names using xmlKeys (if defined) and filters out undefined values.
Context (unused for attributes)
Object with _attr key containing the mapped attributes
Base class for creating XML attributes with automatic name mapping.
XmlAttributeComponent allows you to define attributes using JavaScript-friendly property names that are automatically mapped to XML attribute names. Subclasses can define an xmlKeys map to specify the transformation.
Example