Rating.parse constructor

Rating.parse(
  1. XmlElement element
)

Factory method to parse an XmlElement and create a Rating object from it.

The element is an XML element containing the rating information.

Returns the parsed Rating object.

Implementation

factory Rating.parse(XmlElement element) {
  return Rating(
    scheme: element.getAttribute('scheme'),
    value: element.innerText,
  );
}