Copyright.parse constructor
Copyright.parse(
- XmlElement element
Factory method to create a new Copyright instance from an XML element.
The factory constructor takes an XmlElement
representing the "copyright" element
and extracts its attributes 'url' and inner text. It uses these values to initialize
the properties of the Copyright object.
Implementation
factory Copyright.parse(XmlElement element) {
return Copyright(
url: element.getAttribute('url'), // Extract the 'url' attribute.
value: element
.innerText, // Extract the inner text of the element as 'value'.
);
}