PeerLink.parse constructor

PeerLink.parse(
  1. XmlElement element
)

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

The element is an XML element containing the peer link information.

Returns the parsed PeerLink object.

Implementation

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