Chapters.parse constructor

Chapters.parse(
  1. XmlElement element
)

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

The element is an XML element containing the chapters information.

Returns the parsed Chapters object.

Implementation

factory Chapters.parse(XmlElement element) {
  return Chapters(
    url: element.getAttribute('url'),
    type: element.getAttribute('type'),
  );
}