Restriction.parse constructor

Restriction.parse(
  1. XmlElement element
)

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

The element is an XML element containing the restriction information.

Returns the parsed Restriction object.

Implementation

factory Restriction.parse(XmlElement element) {
  return Restriction(
    relationship: element.getAttribute('relationship'),
    type: element.getAttribute('type'),
    value: element.innerText,
  );
}